Fix misc compile warnings (#11258)

This commit is contained in:
David 2019-11-14 00:01:21 +01:00 committed by Niklas Adolfsson
parent db1ea1dcd8
commit e194a2c6e3
6 changed files with 15 additions and 6 deletions

View File

@ -38,7 +38,7 @@ impl<'a> Into<String> for &'a Uuid {
let d3 = &self.0[6..8]; let d3 = &self.0[6..8];
let d4 = &self.0[8..10]; let d4 = &self.0[8..10];
let d5 = &self.0[10..16]; let d5 = &self.0[10..16];
[d1, d2, d3, d4, d5].into_iter().map(|d| d.to_hex()).collect::<Vec<String>>().join("-") [d1, d2, d3, d4, d5].iter().map(|d| d.to_hex()).collect::<Vec<String>>().join("-")
} }
} }

View File

@ -359,30 +359,39 @@ impl Implementation for EthereumBuiltin {
} }
#[derive(Debug)] #[derive(Debug)]
/// The identity builtin
pub struct Identity; pub struct Identity;
#[derive(Debug)] #[derive(Debug)]
/// The EC Recover builtin
pub struct EcRecover; pub struct EcRecover;
#[derive(Debug)] #[derive(Debug)]
/// The Sha256 builtin
pub struct Sha256; pub struct Sha256;
#[derive(Debug)] #[derive(Debug)]
/// The Ripemd160 builtin
pub struct Ripemd160; pub struct Ripemd160;
#[derive(Debug)] #[derive(Debug)]
/// The Modexp builtin
pub struct Modexp; pub struct Modexp;
#[derive(Debug)] #[derive(Debug)]
/// The Bn128Add builtin
pub struct Bn128Add; pub struct Bn128Add;
#[derive(Debug)] #[derive(Debug)]
/// The Bn128Mul builtin
pub struct Bn128Mul; pub struct Bn128Mul;
#[derive(Debug)] #[derive(Debug)]
/// The Bn128Pairing builtin
pub struct Bn128Pairing; pub struct Bn128Pairing;
#[derive(Debug)] #[derive(Debug)]
/// The Blake2F builtin
pub struct Blake2F; pub struct Blake2F;
impl Implementation for Identity { impl Implementation for Identity {

View File

@ -53,7 +53,7 @@ pub struct TransactionFilter {
contract_address: Address, contract_address: Address,
transition_block: BlockNumber, transition_block: BlockNumber,
permission_cache: Mutex<LruCache<(H256, Address), u32>>, permission_cache: Mutex<LruCache<(H256, Address), u32>>,
contract_version_cache: Mutex<LruCache<(H256), Option<U256>>> contract_version_cache: Mutex<LruCache<H256, Option<U256>>>
} }
impl TransactionFilter { impl TransactionFilter {

View File

@ -1207,7 +1207,7 @@ impl Client {
gas: U256::from(50_000_000), gas: U256::from(50_000_000),
gas_price: U256::default(), gas_price: U256::default(),
value: U256::default(), value: U256::default(),
data: data, data,
}.fake_sign(from) }.fake_sign(from)
} }

View File

@ -708,7 +708,7 @@ impl ApiSet {
Api::Rpc, Api::Rpc,
Api::Private, Api::Private,
] ]
.into_iter() .iter()
.cloned() .cloned()
.collect(); .collect();
@ -750,7 +750,7 @@ impl ApiSet {
Api::Traces, Api::Traces,
Api::ParityTransactionsPool, Api::ParityTransactionsPool,
] ]
.into_iter() .iter()
.cloned() .cloned()
.collect(), .collect(),
} }

View File

@ -41,7 +41,7 @@ fn check_hex(string: &str) -> Result<()> {
} }
/// given a type and HashMap<String, Vec<FieldType>> /// given a type and HashMap<String, Vec<FieldType>>
/// returns a HashSet of dependent types of the given type /// returns a HashSet of dependent types of the given type
fn build_dependencies<'a>(message_type: &'a str, message_types: &'a MessageTypes) -> Option<(HashSet<&'a str>)> fn build_dependencies<'a>(message_type: &'a str, message_types: &'a MessageTypes) -> Option<HashSet<&'a str>>
{ {
if message_types.get(message_type).is_none() { if message_types.get(message_type).is_none() {
return None; return None;