From f7dc961d2c58012fb110b4fbbc33e64f6f2bf857 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 29 Nov 2018 10:27:49 -0800 Subject: [PATCH] Fix some clippy warnings. --- lib/execute/src/signalhandlers.rs | 4 ++-- lib/execute/src/traphandlers.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/execute/src/signalhandlers.rs b/lib/execute/src/signalhandlers.rs index b0cf3e52ee..9ce155c8ff 100644 --- a/lib/execute/src/signalhandlers.rs +++ b/lib/execute/src/signalhandlers.rs @@ -45,7 +45,7 @@ pub fn ensure_eager_signal_handlers() { } state.tried = true; - assert!(state.success == false); + assert!(!state.success); if !unsafe { EnsureEagerSignalHandlers() } { return; @@ -64,7 +64,7 @@ fn ensure_darwin_mach_ports() { } state.tried = true; - assert!(state.success == false); + assert!(!state.success); if !unsafe { EnsureDarwinMachPorts() } { return; diff --git a/lib/execute/src/traphandlers.rs b/lib/execute/src/traphandlers.rs index b943e3d3c7..bc84c2309e 100644 --- a/lib/execute/src/traphandlers.rs +++ b/lib/execute/src/traphandlers.rs @@ -54,7 +54,7 @@ pub extern "C" fn Unwind() { #[no_mangle] pub extern "C" fn LookupCodeSegment(_pc: *const ::std::os::raw::c_void) -> *const CodeSegment { // TODO: Implement this. - unsafe { mem::transmute(-1isize) } + -1isize as *const CodeSegment } /// A simple guard to ensure that `JMP_BUFS` is reset when we're done.