Browse Source

clippy: Fix latest nightly lints

Signed-off-by: Dave Tucker <[email protected]>
Dave Tucker 2 years ago
parent
commit
a8eef00595
2 changed files with 3 additions and 3 deletions
  1. 1 1
      xtask/src/build_ebpf.rs
  2. 2 2
      xtask/src/docs/mod.rs

+ 1 - 1
xtask/src/build_ebpf.rs

@@ -81,7 +81,7 @@ fn build_rust_ebpf(opts: &Options) -> anyhow::Result<()> {
 
 fn get_libbpf_headers<P: AsRef<Path>>(libbpf_dir: P, include_path: P) -> anyhow::Result<()> {
     let dir = include_path.as_ref();
-    fs::create_dir_all(&dir)?;
+    fs::create_dir_all(dir)?;
     let status = Command::new("make")
         .current_dir(libbpf_dir.as_ref().join("src"))
         .arg(format!("INCLUDEDIR={}", dir.as_os_str().to_string_lossy()))

+ 2 - 2
xtask/src/docs/mod.rs

@@ -55,7 +55,7 @@ pub fn docs() -> Result<(), anyhow::Error> {
 
 fn build_docs(working_dir: &PathBuf, abs_header_path: &Path) -> Result<(), anyhow::Error> {
     let replace = Command::new("sed")
-        .current_dir(&working_dir)
+        .current_dir(working_dir)
         .args(vec!["-i.bak", "s/crabby.svg/crabby_dev.svg/", "src/lib.rs"])
         .status()
         .expect("failed to replace logo");
@@ -64,7 +64,7 @@ fn build_docs(working_dir: &PathBuf, abs_header_path: &Path) -> Result<(), anyho
     let args = vec!["+nightly", "doc", "--no-deps", "--all-features"];
 
     let status = Command::new("cargo")
-        .current_dir(&working_dir)
+        .current_dir(working_dir)
         .env(
             "RUSTDOCFLAGS",
             format!("--html-in-header {}", abs_header_path.to_str().unwrap()),