We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95fedf4 commit 6e0abaeCopy full SHA for 6e0abae
tokio/src/fs/read_uring.rs
@@ -19,11 +19,7 @@ pub(crate) async fn read_uring(path: &Path) -> io::Result<Vec<u8>> {
19
let file = OpenOptions::new().read(true).open(path).await?;
20
21
// TODO: use io uring in the future to obtain metadata
22
- let size_hint: Option<usize> = file
23
- .metadata()
24
- .await
25
- .map(|m| usize::try_from(m.len()).unwrap_or(usize::MAX))
26
- .ok();
+ let size_hint: Option<usize> = file.metadata().await.map(|m| m.len() as usize).ok();
27
28
let fd: OwnedFd = file
29
.try_into_std()
0 commit comments