Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Zvonko Kaiser <[email protected]>
  • Loading branch information
zvonkok committed Jun 6, 2024
1 parent e7f43c5 commit f87472a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/generate/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Generator {
let idx = self.env_map.entry(key.clone()).or_insert(env_vec.len());

if let Some(elem) = env_vec.get_mut(*idx) {
*elem = env.clone();
elem.clone_from(env);
} else {
env_vec.push(env.clone());
self.env_map.insert(key, env_vec.len() - 1);
Expand Down
2 changes: 1 addition & 1 deletion src/spec_dirs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn with_spec_dirs(dirs: &[&str]) -> CdiOption {
.collect();

Box::new(move |cache: &mut Cache| {
cache.spec_dirs = cleaned_dirs.clone();
cache.spec_dirs.clone_from(&cleaned_dirs);
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ where
});

if result.is_none() {
result = v2.clone();
result.clone_from(v2);
}

result
Expand Down

0 comments on commit f87472a

Please sign in to comment.