From 83f4407bed6fff091b65ae6688b99dd0dbe809e6 Mon Sep 17 00:00:00 2001 From: Danilo Guanabara Date: Wed, 28 Aug 2024 21:23:33 -0300 Subject: [PATCH] Fixing with newest clippy --- ecosystem/rust/cargo/src/build_system.rs | 2 +- ecosystem/rust/cargo/src/exporter/mod.rs | 2 +- ligen/generator/src/generator/file_generator/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ecosystem/rust/cargo/src/build_system.rs b/ecosystem/rust/cargo/src/build_system.rs index b558a85d..1c2c194b 100644 --- a/ecosystem/rust/cargo/src/build_system.rs +++ b/ecosystem/rust/cargo/src/build_system.rs @@ -76,7 +76,7 @@ impl BuildSystem for CargoBuilder { for entry in directory { if let Some(file_name) = entry.file_name().to_str() { if entry.file_type()?.is_file() && file_name.contains(&library.identifier.name) { - std::fs::copy(&entry.path(), libraries_dir.join(file_name))?; + std::fs::copy(entry.path(), libraries_dir.join(file_name))?; } } } diff --git a/ecosystem/rust/cargo/src/exporter/mod.rs b/ecosystem/rust/cargo/src/exporter/mod.rs index 71ceb885..fefbc200 100644 --- a/ecosystem/rust/cargo/src/exporter/mod.rs +++ b/ecosystem/rust/cargo/src/exporter/mod.rs @@ -15,7 +15,7 @@ impl FileGenerator for CargoGenerator { } fn generate_files(&self, library: &Library, file_set: &mut FileSet) -> Result<()> { - let file = file_set.entry(&PathBuf::from_str("Cargo.toml").unwrap()); + let file = file_set.entry(PathBuf::from_str("Cargo.toml").unwrap()); let version = "0.1.0"; let name = &library.identifier; // FIXME: This is a placeholder and it will fail. diff --git a/ligen/generator/src/generator/file_generator/mod.rs b/ligen/generator/src/generator/file_generator/mod.rs index b82972e2..2f916176 100644 --- a/ligen/generator/src/generator/file_generator/mod.rs +++ b/ligen/generator/src/generator/file_generator/mod.rs @@ -30,7 +30,7 @@ pub trait FileGenerator { .join(self.base_path()); for (_path, file) in file_set.files { let file_path = library_dir.join(&file.path); - write_file(&file_path, &file.to_string())?; + write_file(&file_path, file.to_string())?; } Ok(()) }