diff --git a/substrate/bin/utils/subkey/src/main.rs b/substrate/bin/utils/subkey/src/main.rs index 05d22cd57b..88acae9836 100644 --- a/substrate/bin/utils/subkey/src/main.rs +++ b/substrate/bin/utils/subkey/src/main.rs @@ -362,14 +362,15 @@ fn read_message_from_stdin(should_decode: bool) -> Vec { message } -fn read_required_parameter(matches: &ArgMatches, name: &str) -> T -where +fn read_required_parameter(matches: &ArgMatches, name: &str) -> T where ::Err: std::fmt::Debug, { let str_value = matches .value_of(name) .expect("parameter is required; thus it can't be None; qed"); - str::parse::(str_value).expect("Invalid 'nonce' parameter; expecting an integer.") + str::parse::(str_value).unwrap_or_else(|_| + panic!("Invalid `{}' parameter; expecting an integer.", name) + ) } fn read_genesis_hash(matches: &ArgMatches) -> H256 { @@ -388,8 +389,7 @@ fn read_genesis_hash(matches: &ArgMatches) -> H256 { genesis_hash } -fn read_signature(matches: &ArgMatches) -> SignatureOf -where +fn read_signature(matches: &ArgMatches) -> SignatureOf where SignatureOf: SignatureT, PublicOf: PublicT, { @@ -446,8 +446,7 @@ fn read_account_id(matched_uri: Option<&str>) -> AccountId { fn read_pair( matched_suri: Option<&str>, password: Option<&str>, -) -> ::Pair -where +) -> ::Pair where SignatureOf: SignatureT, PublicOf: PublicT, { diff --git a/substrate/client/consensus/uncles/src/lib.rs b/substrate/client/consensus/uncles/src/lib.rs index 5839fb0a01..4a7e8dc0d6 100644 --- a/substrate/client/consensus/uncles/src/lib.rs +++ b/substrate/client/consensus/uncles/src/lib.rs @@ -15,8 +15,6 @@ // along with Substrate. If not, see . //! Uncles functionality for Substrate. -//! -#![deny(warnings)] #![forbid(unsafe_code, missing_docs)] use sp_consensus::SelectChain;