summaryrefslogtreecommitdiff
path: root/src/fcntl.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2020-05-16 17:03:47 -0600
committerAlan Somers <asomers@gmail.com>2020-06-27 17:36:46 -0600
commit46a869814ddbb2678e968fcb87cfd7fb8043f177 (patch)
tree09d17da8e0da3f43fdd97d76bd829cbcb8bdd8e4 /src/fcntl.rs
parentaf45859aa00670b8cea6a9704d8fd3b35db2ac93 (diff)
downloadnix-46a869814ddbb2678e968fcb87cfd7fb8043f177.zip
misc clippy cleanup
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r--src/fcntl.rs4
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,