Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Oct 23, 2024
1 parent 91ac8df commit 916f491
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/fuzzer/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ mod tests {
manager::CampaignManager,
},
instrumenter::path::InstrumentedPath,
EmptyResult,
};
use contract_transcode::ContractMessageTranscoder;

Expand Down
2 changes: 1 addition & 1 deletion src/instrumenter/instrumentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ mod tests {
let instrumenter = Instrumenter::new(config.clone());

instrumenter.fork().unwrap();
let files: Vec<_> = WalkDir::new(&instrumenter.output_directory())
let files: Vec<_> = WalkDir::new(instrumenter.output_directory())
.into_iter()
.filter_map(|e| e.ok())
.filter(|e| e.path().extension().map_or(false, |ext| ext == "rs"))
Expand Down
9 changes: 2 additions & 7 deletions src/instrumenter/traits/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@ pub trait ContractVisitor {
}

/// Depending the `injector`, we visit the `code` and save + format it into `path`
fn instrument_file(
&self,
path: PathBuf,
code: &String,
injector: impl VisitMut,
) -> EmptyResult {
fn instrument_file(&self, path: PathBuf, code: &str, injector: impl VisitMut) -> EmptyResult {
phink_log!(self, "{}", format!("📝 Instrumenting {}", path.display()));

let modified_code = Self::visit_code(code, injector)
Expand Down Expand Up @@ -171,7 +166,7 @@ pub trait ContractVisitor {
}

/// Run `rustfmt` on a `rust_file`
fn format(&self, rust_file: &PathBuf) -> EmptyResult {
fn format(&self, rust_file: &Path) -> EmptyResult {
phink_log!(
&self,
"🛠️ Formatting {} with `rustfmt`...",
Expand Down

0 comments on commit 916f491

Please sign in to comment.