Fixed warnings
This commit is contained in:
@@ -635,7 +635,7 @@ mod tests {
|
||||
use std::str::FromStr;
|
||||
|
||||
#[test]
|
||||
#[allow(eq_op)]
|
||||
#[cfg_attr(feature="dev", allow(eq_op))]
|
||||
fn hash() {
|
||||
let h = H64([0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef]);
|
||||
assert_eq!(H64::from_str("0123456789abcdef").unwrap(), h);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
use std::thread;
|
||||
use std::ops::DerefMut;
|
||||
use std::any::Any;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
/// Thread-safe closure for handling possible panics
|
||||
@@ -75,7 +74,7 @@ impl PanicHandler {
|
||||
#[cfg_attr(feature="dev", allow(deprecated))]
|
||||
// TODO [todr] catch_panic is deprecated but panic::recover has different bounds (not allowing mutex)
|
||||
pub fn catch_panic<G, R>(&self, g: G) -> thread::Result<R> where G: FnOnce() -> R + Send + 'static {
|
||||
let guard = PanicGuard { handler: self };
|
||||
let _guard = PanicGuard { handler: self };
|
||||
let result = g();
|
||||
Ok(result)
|
||||
}
|
||||
@@ -108,13 +107,6 @@ impl<F> OnPanicListener for F
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_to_string(t: &Box<Any + Send>) -> Option<String> {
|
||||
let as_str = t.downcast_ref::<&'static str>().cloned().map(|t| t.to_owned());
|
||||
let as_string = t.downcast_ref::<String>().cloned();
|
||||
|
||||
as_str.or(as_string)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore] // panic forwarding doesnt work on the same thread in beta
|
||||
fn should_notify_listeners_about_panic () {
|
||||
|
||||
@@ -991,7 +991,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(eq_op)]
|
||||
#[cfg_attr(feature="dev", allow(eq_op))]
|
||||
pub fn uint256_comp_test() {
|
||||
let small = U256([10u64, 0, 0, 0]);
|
||||
let big = U256([0x8C8C3EE70C644118u64, 0x0209E7378231E632, 0, 0]);
|
||||
|
||||
Reference in New Issue
Block a user