Skip to content

Commit 24fad76

Browse files
committed
code review
1 parent 98d8a51 commit 24fad76

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/fs/file.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use crate::prelude::*;
1515
use crate::task::{spawn_blocking, Context, Poll, Waker};
1616
use crate::utils::Context as _;
1717

18+
const ARC_TRY_UNWRAP_EXPECT: &str = "cannot acquire ownership of the file handle after drop";
19+
1820
/// An open file on the filesystem.
1921
///
2022
/// Depending on what options the file was opened with, this type can be used for reading and/or
@@ -413,9 +415,7 @@ impl From<std::fs::File> for File {
413415
}
414416

415417
cfg_unix! {
416-
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
417-
418-
418+
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
419419

420420
impl AsRawFd for File {
421421
fn as_raw_fd(&self) -> RawFd {
@@ -1008,6 +1008,4 @@ mod tests {
10081008
Ok(())
10091009
})
10101010
}
1011-
}
1012-
1013-
const ARC_TRY_UNWRAP_EXPECT: &str = "cannot acquire ownership of the file handle after drop";
1011+
}

0 commit comments

Comments
 (0)