diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-03 18:43:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 18:43:08 +0000 |
commit | 6f0ca030a30fd813ad74f7dc4d63d3d5538090b0 (patch) | |
tree | cc419746286c9195a7c375b0efeccf59d4e3e648 /src/fcntl.rs | |
parent | 679c78611c0b402836adbca445cf76996eb8d1d3 (diff) | |
parent | 27d39b201bb08b58e3a74600008b39657164e688 (diff) | |
download | nix-6f0ca030a30fd813ad74f7dc4d63d3d5538090b0.zip |
Merge #1244
1244: Clippy cleanup r=asomers a=asomers
Reported-by: Clippy
Co-authored-by: Alan Somers <asomers@gmail.com>
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r-- | src/fcntl.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index ea036427..1581d3a7 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -161,6 +161,8 @@ libc_bitflags!( } ); +// The conversion is not identical on all operating systems. +#[allow(clippy::identity_conversion)] pub fn open<P: ?Sized + NixPath>(path: &P, oflag: OFlag, mode: Mode) -> Result<RawFd> { let fd = path.with_nix_path(|cstr| { unsafe { libc::open(cstr.as_ptr(), oflag.bits(), mode.bits() as c_uint) } @@ -169,6 +171,8 @@ pub fn open<P: ?Sized + NixPath>(path: &P, oflag: OFlag, mode: Mode) -> Result<R Errno::result(fd) } +// The conversion is not identical on all operating systems. +#[allow(clippy::identity_conversion)] #[cfg(not(target_os = "redox"))] pub fn openat<P: ?Sized + NixPath>( dirfd: RawFd, |