mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-30 17:25:32 +00:00
code review
This commit is contained in:
parent
7c408f11dc
commit
e1d66f53a2
1 changed files with 4 additions and 6 deletions
|
@ -15,6 +15,8 @@ use crate::prelude::*;
|
|||
use crate::task::{spawn_blocking, Context, Poll, Waker};
|
||||
use crate::utils::Context as _;
|
||||
|
||||
const ARC_TRY_UNWRAP_EXPECT: &str = "cannot acquire ownership of the file handle after drop";
|
||||
|
||||
/// An open file on the filesystem.
|
||||
///
|
||||
/// 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 {
|
|||
}
|
||||
|
||||
cfg_unix! {
|
||||
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
|
||||
|
||||
|
||||
use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
|
||||
|
||||
impl AsRawFd for File {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
|
@ -1027,6 +1027,4 @@ mod tests {
|
|||
Ok(())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const ARC_TRY_UNWRAP_EXPECT: &str = "cannot acquire ownership of the file handle after drop";
|
||||
}
|
Loading…
Reference in a new issue