Skip to content

Commit

Permalink
fix clippy needless_borrow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitris committed Oct 31, 2022
1 parent d4a399f commit d0424fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xtask/src/codegen/aya.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn codegen_internal_btf_bindings(opts: &Options) -> Result<(), anyhow::Error> {
.to_string();

// write the bindings, with the original helpers removed
write_to_file(&generated.join("btf_internal_bindings.rs"), &bindings)?;
write_to_file(generated.join("btf_internal_bindings.rs"), &bindings)?;

Ok(())
}
Expand Down Expand Up @@ -219,7 +219,7 @@ fn codegen_bindings(opts: &Options) -> Result<(), anyhow::Error> {

// write the bindings, with the original helpers removed
write_to_file(
&generated.join(format!("linux_bindings_{}.rs", arch)),
generated.join(format!("linux_bindings_{}.rs", arch)),
&bindings.to_string(),
)?;
}
Expand Down
4 changes: 2 additions & 2 deletions xtask/src/codegen/aya_bpf_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ pub fn codegen(opts: &Options) -> Result<(), anyhow::Error> {
let generated = dir.join("src").join(arch.to_string());
// write the bindings, with the original helpers removed
write_to_file_fmt(
&generated.join("bindings.rs"),
generated.join("bindings.rs"),
&tree.to_token_stream().to_string(),
)?;

// write the new helpers as expanded by expand_helpers()
write_to_file_fmt(
&generated.join("helpers.rs"),
generated.join("helpers.rs"),
&format!("use super::bindings::*; {}", helpers),
)?;
}
Expand Down

0 comments on commit d0424fb

Please sign in to comment.