Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
chore: clippy (#1990)
Browse files Browse the repository at this point in the history
* chore: clippy

* chore: clippy
  • Loading branch information
DaniPopes authored Dec 30, 2022
1 parent 48dbbbd commit c5ff733
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion ethers-solc/benches/compile_many.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ fn load_compiler_inputs() -> Vec<CompilerInput> {
let mut inputs = Vec::new();
for file in std::fs::read_dir(Path::new(&env!("CARGO_MANIFEST_DIR")).join("test-data/in"))
.unwrap()
.into_iter()
.take(5)
{
let file = file.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions ethers-solc/src/artifacts/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1089,11 +1089,11 @@ mod tests {
let result: Result<SourceUnit, _> = serde_path_to_error::deserialize(deserializer);
match result {
Err(e) => {
println!("... {} fail: {e}", path_str);
println!("... {path_str} fail: {e}");
panic!();
}
Ok(_) => {
println!("... {} ok", path_str);
println!("... {path_str} ok");
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion ethers-solc/src/compile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ impl Solc {

use sha2::Digest;
let mut hasher = sha2::Sha256::new();
hasher.update(&content);
hasher.update(content);
let checksum_calc = &hasher.finalize()[..];

let checksum_found = &RELEASES.0.get_checksum(&version).expect("checksum not found");
Expand Down
2 changes: 1 addition & 1 deletion ethers-solc/src/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ impl Graph {
return Vec::new()
}

let mut result = sets.pop().cloned().expect("not empty; qed.").clone();
let mut result = sets.pop().cloned().expect("not empty; qed.");
if !sets.is_empty() {
result.retain(|item| sets.iter().all(|set| set.contains(item)));
}
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/examples/create_custom_middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ where
};

println!("Original transaction gas: {curr_gas:?} wei");
let units: U256 = U256::exp10(CONTINGENCY_UNITS.into());
let units: U256 = U256::exp10(CONTINGENCY_UNITS);
let raised_gas: U256 = (curr_gas * self.contingency) / units;
tx.set_gas(raised_gas);
println!("Raised transaction gas: {raised_gas:?} wei");
Expand Down

0 comments on commit c5ff733

Please sign in to comment.