Skip to content

Commit

Permalink
Merge pull request #23 from zvonkok/clippy
Browse files Browse the repository at this point in the history
clippy fixes
  • Loading branch information
Apokleos authored Jun 6, 2024
2 parents e7f43c5 + f87472a commit 2b8c61b
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 2b8c61b

Please sign in to comment.