Merge branch 'master' of github.com:ethcore/parity into net
This commit is contained in:
@@ -19,9 +19,17 @@
|
||||
#![feature(augmented_assignments)]
|
||||
#![feature(associated_consts)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(clippy)]
|
||||
#![allow(needless_range_loop, match_bool)]
|
||||
#![feature(catch_panic)]
|
||||
// Clippy settings
|
||||
#![plugin(clippy)]
|
||||
// TODO [todr] not really sure
|
||||
#![allow(needless_range_loop)]
|
||||
// Shorter than if-else
|
||||
#![allow(match_bool)]
|
||||
// We use that to be more explicit about handled cases
|
||||
#![allow(match_same_arms)]
|
||||
// Keeps consistency (all lines with `.clone()`) and helpful when changing ref to non-ref.
|
||||
#![allow(clone_on_copy)]
|
||||
|
||||
//! Ethcore-util library
|
||||
//!
|
||||
|
||||
@@ -104,7 +104,7 @@ impl<F> OnPanicListener for F
|
||||
}
|
||||
|
||||
fn convert_to_string(t: &Box<Any + Send>) -> Option<String> {
|
||||
let as_str = t.downcast_ref::<&'static str>().map(|t| t.clone().to_owned());
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user