Skip to content

Commit

Permalink
fix: remove useless clone
Browse files Browse the repository at this point in the history
  • Loading branch information
xusd320 committed Dec 11, 2024
1 parent c2bae12 commit e491471
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/mako/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,10 @@ impl Config {

// support relative alias
config.resolve.alias.iter_mut().for_each(|(_, v)| {
*v = if v.starts_with('.') {
#[allow(clippy::needless_borrows_for_generic_args)]
root.join(&v).to_string_lossy().to_string()
} else {
v.clone()
};
#[allow(clippy::needless_borrows_for_generic_args)]
if v.starts_with('.') {
*v = root.join(&v).to_string_lossy().to_string()
}
});

Check warning on line 391 in crates/mako/src/config.rs

View check run for this annotation

Codecov / codecov/patch

crates/mako/src/config.rs#L388-L391

Added lines #L388 - L391 were not covered by tests

// dev 环境下不产生 hash, prod 环境下根据用户配置
Expand Down

0 comments on commit e491471

Please sign in to comment.