Skip to content

Commit

Permalink
chore: clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Sep 13, 2021
1 parent be00b10 commit 1104b06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use evm::{Config, Handler};
use evm::{ExitReason, ExitRevert, ExitSucceed};
use std::{
collections::{BTreeMap, HashMap},
path::PathBuf,
path::{PathBuf, Path},
};

use eyre::Result;
Expand Down Expand Up @@ -340,15 +340,15 @@ impl<'a> SolcBuilder<'a> {
.filter_map(|fname| fname.ok())
.filter_map(|fname| self.detect_version(fname).ok().flatten())
.fold(HashMap::new(), |mut map, (version, path)| {
let entry = map.entry(version.to_string()).or_insert(vec![]);
let entry = map.entry(version.to_string()).or_insert_with(Vec::new);
entry.push(path);
map
}))
}

/// Parses the given Solidity file looking for the `pragma` definition and
/// returns the corresponding SemVer version requirement.
fn version_req(path: &PathBuf) -> Result<VersionReq> {
fn version_req(path: &Path) -> Result<VersionReq> {
let file = BufReader::new(File::open(path)?);
let version = file
.lines()
Expand Down

0 comments on commit 1104b06

Please sign in to comment.