chore: clippy

This commit is contained in:
DaniPopes 2022-12-30 09:36:44 +01:00
parent bd220f308d
commit 5550f4e856
No known key found for this signature in database
GPG Key ID: 0F09640DDB7AC692
3 changed files with 2 additions and 3 deletions

View File

@ -36,7 +36,6 @@ fn load_compiler_inputs() -> Vec<CompilerInput> {
let mut inputs = Vec::new(); let mut inputs = Vec::new();
for file in std::fs::read_dir(Path::new(&env!("CARGO_MANIFEST_DIR")).join("test-data/in")) for file in std::fs::read_dir(Path::new(&env!("CARGO_MANIFEST_DIR")).join("test-data/in"))
.unwrap() .unwrap()
.into_iter()
.take(5) .take(5)
{ {
let file = file.unwrap(); let file = file.unwrap();

View File

@ -457,7 +457,7 @@ impl Solc {
use sha2::Digest; use sha2::Digest;
let mut hasher = sha2::Sha256::new(); let mut hasher = sha2::Sha256::new();
hasher.update(&content); hasher.update(content);
let checksum_calc = &hasher.finalize()[..]; let checksum_calc = &hasher.finalize()[..];
let checksum_found = &RELEASES.0.get_checksum(&version).expect("checksum not found"); let checksum_found = &RELEASES.0.get_checksum(&version).expect("checksum not found");

View File

@ -649,7 +649,7 @@ impl Graph {
return Vec::new() 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() { if !sets.is_empty() {
result.retain(|item| sets.iter().all(|set| set.contains(item))); result.retain(|item| sets.iter().all(|set| set.contains(item)));
} }