mirror of https://github.com/fafhrd91/actix-web
fix clippy warning
This commit is contained in:
parent
a751be73cc
commit
5d3d1fb20e
|
@ -92,12 +92,11 @@ fn chunked_read_file_callback(
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "io-uring")]
|
#[cfg(feature = "io-uring")]
|
||||||
fn chunked_read_file_callback(
|
async fn chunked_read_file_callback(
|
||||||
file: File,
|
file: File,
|
||||||
offset: u64,
|
offset: u64,
|
||||||
max_bytes: usize,
|
max_bytes: usize,
|
||||||
) -> impl Future<Output = io::Result<(File, Bytes)>> {
|
) -> io::Result<(File, Bytes)> {
|
||||||
async move {
|
|
||||||
let buf = Vec::with_capacity(max_bytes);
|
let buf = Vec::with_capacity(max_bytes);
|
||||||
|
|
||||||
let (res, mut buf) = file.read_at(buf, offset).await;
|
let (res, mut buf) = file.read_at(buf, offset).await;
|
||||||
|
@ -111,7 +110,6 @@ fn chunked_read_file_callback(
|
||||||
|
|
||||||
Ok((file, Bytes::from(buf)))
|
Ok((file, Bytes::from(buf)))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "io-uring")]
|
#[cfg(feature = "io-uring")]
|
||||||
impl<F, Fut> Stream for ChunkedReadFile<F, Fut>
|
impl<F, Fut> Stream for ChunkedReadFile<F, Fut>
|
||||||
|
|
Loading…
Reference in New Issue