fix clippy needless_borrow warning

pull/428/head
Dmitry Savintsev 2 years ago
parent d4a399fb0c
commit d0424fb091

@ -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(())
}
@ -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(),
)?;
}

@ -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),
)?;
}

Loading…
Cancel
Save