diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 20 | ||||
-rw-r--r-- | src/sys/signal.rs | 6 |
2 files changed, 13 insertions, 13 deletions
@@ -128,22 +128,22 @@ impl From<std::string::FromUtf8Error> for Error { impl error::Error for Error { fn description(&self) -> &str { - match self { - &Error::InvalidPath => "Invalid path", - &Error::InvalidUtf8 => "Invalid UTF-8 string", - &Error::UnsupportedOperation => "Unsupported Operation", - &Error::Sys(ref errno) => errno.desc(), + match *self { + Error::InvalidPath => "Invalid path", + Error::InvalidUtf8 => "Invalid UTF-8 string", + Error::UnsupportedOperation => "Unsupported Operation", + Error::Sys(ref errno) => errno.desc(), } } } impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - &Error::InvalidPath => write!(f, "Invalid path"), - &Error::InvalidUtf8 => write!(f, "Invalid UTF-8 string"), - &Error::UnsupportedOperation => write!(f, "Unsupported Operation"), - &Error::Sys(errno) => write!(f, "{:?}: {}", errno, errno.desc()), + match *self { + Error::InvalidPath => write!(f, "Invalid path"), + Error::InvalidUtf8 => write!(f, "Invalid UTF-8 string"), + Error::UnsupportedOperation => write!(f, "Unsupported Operation"), + Error::Sys(errno) => write!(f, "{:?}: {}", errno, errno.desc()), } } } diff --git a/src/sys/signal.rs b/src/sys/signal.rs index f82e4502..0642a691 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -34,7 +34,7 @@ libc_enum!{ SIGPIPE, SIGALRM, SIGTERM, - #[cfg(all(any(target_os = "android", target_os = "emscripten", target_os = "linux"), + #[cfg(all(any(target_os = "android", target_os = "emscripten", target_os = "linux"), not(any(target_arch = "mips", target_arch = "mips64"))))] SIGSTKFLT, SIGCHLD, @@ -560,8 +560,8 @@ mod sigevent { #[cfg(any(target_os = "freebsd", target_os = "linux"))] fn set_tid(sev: &mut libc::sigevent, sigev_notify: &SigevNotify) { - sev.sigev_notify_thread_id = match sigev_notify { - &SigevNotify::SigevThreadId { thread_id, .. } => thread_id, + sev.sigev_notify_thread_id = match *sigev_notify { + SigevNotify::SigevThreadId { thread_id, .. } => thread_id, _ => 0 as type_of_thread_id }; } |