summaryrefslogtreecommitdiff
path: root/src/fcntl.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-09-18 21:07:00 -0600
committerAlan Somers <asomers@gmail.com>2021-09-19 07:58:15 -0600
commita09b1c8ac643d448db479a108ac6726307075453 (patch)
tree654a84d639d1feca971396f958f7589fc1fb81bf /src/fcntl.rs
parentf0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff)
downloadnix-a09b1c8ac643d448db479a108ac6726307075453.zip
Clippy cleanup
And this time, start running Clippy in CI
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r--src/fcntl.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs
index 0a50e748..aded27b4 100644
--- a/src/fcntl.rs
+++ b/src/fcntl.rs
@@ -325,7 +325,7 @@ fn inner_readlink<P: ?Sized + NixPath>(dirfd: Option<RawFd>, path: &P) -> Result
Some(next_size) => try_size = next_size,
// It's absurd that this would happen, but handle it sanely
// anyway.
- None => break Err(super::Error::from(Errno::ENAMETOOLONG)),
+ None => break Err(Errno::ENAMETOOLONG),
}
}
}
@@ -646,7 +646,6 @@ pub fn fallocate(
))]
mod posix_fadvise {
use crate::errno::Errno;
- use libc;
use std::os::unix::io::RawFd;
use crate::Result;
@@ -687,6 +686,6 @@ pub fn posix_fallocate(fd: RawFd, offset: libc::off_t, len: libc::off_t) -> Resu
match Errno::result(res) {
Err(err) => Err(err),
Ok(0) => Ok(()),
- Ok(errno) => Err(crate::Error::from(Errno::from_i32(errno))),
+ Ok(errno) => Err(Errno::from_i32(errno)),
}
}