Skip to content

Commit

Permalink
remove some unneeded usages of '&', as suggested by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Sep 14, 2024
1 parent 30e80b9 commit f372252
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion capnpc/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl CodeGenerationCommand {
}

let root_name = path_to_stem_string(&filepath)?.replace('-', "_");
filepath.set_file_name(&format!("{root_name}_capnp.rs"));
filepath.set_file_name(format!("{root_name}_capnp.rs"));

let lines =
Branch(vec![
Expand Down
4 changes: 2 additions & 2 deletions capnpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ impl CompilerCommand {
}

for import_path in &self.import_paths {
command.arg(&format!("--import-path={}", import_path.display()));
command.arg(format!("--import-path={}", import_path.display()));
}

for src_prefix in &self.src_prefixes {
command.arg(&format!("--src-prefix={}", src_prefix.display()));
command.arg(format!("--src-prefix={}", src_prefix.display()));
}

for file in &self.files {
Expand Down

0 comments on commit f372252

Please sign in to comment.