Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
de1acr0ix committed Jun 6, 2021
1 parent f9f4926 commit a1ad38a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/db/memory-db/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn instantiation(b: &mut Criterion) {
fn compare_to_null_embedded_in_struct(b: &mut Criterion) {
struct X {
a_hash: <KeccakHasher as Hasher>::Out,
};
}
let x = X {
a_hash: KeccakHasher::hash(&[0u8][..]),
};
Expand Down
6 changes: 2 additions & 4 deletions crates/ethcore/src/externalities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,8 @@ where
let index = self.env_info.number - number.low_u64() - 1;
assert!(
index < self.env_info.last_hashes.len() as u64,
format!(
"Inconsistent env_info, should contain at least {:?} last hashes",
index + 1
)
"Inconsistent env_info, should contain at least {:?} last hashes",
index + 1,
);
let r = self.env_info.last_hashes[index as usize].clone();
trace!(
Expand Down
2 changes: 1 addition & 1 deletion crates/net/fetch/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ mod test {
.map(|resp| resp.concat2())
.flatten()
.map(|body| assert_eq!(&body[..], b"123"))
.map_err(|err| panic!(err));
.map_err(|err| panic!("{}", err));

runtime.block_on(future).unwrap();
}
Expand Down
4 changes: 2 additions & 2 deletions crates/util/EIP-712/src/eip712.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ lazy_static! {
static ref IDENT_REGEX: Regex = Regex::new(r"^[a-zA-Z_$][a-zA-Z_$0-9]*$").unwrap();
}

#[derive(Deserialize, Serialize, Validate, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
#[derive(Deserialize, Serialize, Validate, Debug, Clone)]
pub(crate) struct EIP712Domain {
pub(crate) name: String,
pub(crate) version: String,
Expand All @@ -42,9 +42,9 @@ pub(crate) struct EIP712Domain {
pub(crate) salt: Option<H256>,
}
/// EIP-712 struct
#[derive(Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
#[serde(deny_unknown_fields)]
#[derive(Deserialize, Debug, Clone)]
pub struct EIP712 {
pub(crate) types: MessageTypes,
pub(crate) primary_type: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/evm/benches/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use criterion::{black_box, Bencher, Criterion};
use ethereum_types::{Address, U256};
use evm::Factory;
use rustc_hex::FromHex;
use std::{collections::BTreeMap, str::FromStr, sync::Arc};
use std::{str::FromStr, sync::Arc};
use vm::{tests::FakeExt, ActionParams, Ext, GasLeft, Result};

criterion_group!(
Expand Down
6 changes: 3 additions & 3 deletions crates/vm/evm/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,10 +831,10 @@ impl<Cost: CostType> Interpreter<Cost> {
true,
CallType::StaticCall,
),
_ => panic!(format!(
_ => panic!(
"Unexpected instruction {:?} in CALL branch.",
instruction
)),
instruction,
),
};

// clear return data buffer before creating new call frame.
Expand Down

0 comments on commit a1ad38a

Please sign in to comment.