diff options
author | Alan Somers <asomers@gmail.com> | 2021-09-19 08:29:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-19 08:29:31 -0600 |
commit | 515e99bcffcf324d03128649f3ee0ca14d67b5b1 (patch) | |
tree | 654a84d639d1feca971396f958f7589fc1fb81bf /src/sys/epoll.rs | |
parent | f0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff) | |
parent | a09b1c8ac643d448db479a108ac6726307075453 (diff) | |
download | nix-515e99bcffcf324d03128649f3ee0ca14d67b5b1.zip |
Merge pull request #1529 from asomers/clippy-9-2021
Clippy cleanup
Diffstat (limited to 'src/sys/epoll.rs')
-rw-r--r-- | src/sys/epoll.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/epoll.rs b/src/sys/epoll.rs index 9f68d5ce..6bc2a253 100644 --- a/src/sys/epoll.rs +++ b/src/sys/epoll.rs @@ -1,4 +1,4 @@ -use crate::{Error, Result}; +use crate::Result; use crate::errno::Errno; use libc::{self, c_int}; use std::os::unix::io::RawFd; @@ -86,7 +86,7 @@ pub fn epoll_ctl<'a, T>(epfd: RawFd, op: EpollOp, fd: RawFd, event: T) -> Result { let mut event: Option<&mut EpollEvent> = event.into(); if event.is_none() && op != EpollOp::EpollCtlDel { - Err(Error::from(Errno::EINVAL)) + Err(Errno::EINVAL) } else { let res = unsafe { if let Some(ref mut event) = event { |