mirror of https://github.com/zkat/cacache-rs.git
Fixed clippy warning
This commit is contained in:
parent
d0dbdad856
commit
083e6ae85c
|
|
@ -56,7 +56,7 @@ name = "benchmarks"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["async-std", "mmap"]
|
default = ["async-std", "mmap", "link_to"]
|
||||||
mmap = ["memmap2", "libc"]
|
mmap = ["memmap2", "libc"]
|
||||||
async-std = ["dep:async-std", "futures"]
|
async-std = ["dep:async-std", "futures"]
|
||||||
link_to = []
|
link_to = []
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#[cfg(any(feature = "async-std", feature = "tokio"))]
|
#[cfg(any(feature = "async-std", feature = "tokio"))]
|
||||||
use crate::async_lib::AsyncRead;
|
use crate::async_lib::AsyncRead;
|
||||||
|
#[cfg(any(feature = "async-std", feature = "tokio"))]
|
||||||
|
use crate::async_lib::AsyncReadExt;
|
||||||
use crate::content::linkto;
|
use crate::content::linkto;
|
||||||
use crate::errors::{Error, IoErrorExt, Result};
|
use crate::errors::{Error, IoErrorExt, Result};
|
||||||
use crate::{index, WriteOpts};
|
use crate::{index, WriteOpts};
|
||||||
|
|
@ -11,11 +13,6 @@ use std::pin::Pin;
|
||||||
#[cfg(any(feature = "async-std", feature = "tokio"))]
|
#[cfg(any(feature = "async-std", feature = "tokio"))]
|
||||||
use std::task::{Context as TaskContext, Poll};
|
use std::task::{Context as TaskContext, Poll};
|
||||||
|
|
||||||
#[cfg(feature = "async-std")]
|
|
||||||
use futures::io::AsyncReadExt;
|
|
||||||
#[cfg(feature = "tokio")]
|
|
||||||
use tokio::io::AsyncReadExt;
|
|
||||||
|
|
||||||
const BUF_SIZE: usize = 16 * 1024;
|
const BUF_SIZE: usize = 16 * 1024;
|
||||||
const PROBE_SIZE: usize = 8;
|
const PROBE_SIZE: usize = 8;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue