Преглед изворни кода

fix clippy needless_borrow warning

Dmitry Savintsev пре 2 година
родитељ
комит
d0424fb091
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 2 2
      xtask/src/codegen/aya.rs
  2. 2 2
      xtask/src/codegen/aya_bpf_bindings.rs

+ 2 - 2
xtask/src/codegen/aya.rs

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

+ 2 - 2
xtask/src/codegen/aya_bpf_bindings.rs

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