Skip to content

Commit 916f491

Browse files
committed
Clippy
1 parent 91ac8df commit 916f491

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/fuzzer/fuzz.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ mod tests {
227227
manager::CampaignManager,
228228
},
229229
instrumenter::path::InstrumentedPath,
230+
EmptyResult,
230231
};
231232
use contract_transcode::ContractMessageTranscoder;
232233

src/instrumenter/instrumentation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ mod tests {
304304
let instrumenter = Instrumenter::new(config.clone());
305305

306306
instrumenter.fork().unwrap();
307-
let files: Vec<_> = WalkDir::new(&instrumenter.output_directory())
307+
let files: Vec<_> = WalkDir::new(instrumenter.output_directory())
308308
.into_iter()
309309
.filter_map(|e| e.ok())
310310
.filter(|e| e.path().extension().map_or(false, |ext| ext == "rs"))

src/instrumenter/traits/visitor.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@ pub trait ContractVisitor {
9797
}
9898

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

108103
let modified_code = Self::visit_code(code, injector)
@@ -171,7 +166,7 @@ pub trait ContractVisitor {
171166
}
172167

173168
/// Run `rustfmt` on a `rust_file`
174-
fn format(&self, rust_file: &PathBuf) -> EmptyResult {
169+
fn format(&self, rust_file: &Path) -> EmptyResult {
175170
phink_log!(
176171
&self,
177172
"🛠️ Formatting {} with `rustfmt`...",

0 commit comments

Comments
 (0)