Skip to content

Commit d7f2cd8

Browse files
committed
Simplify symlink handling in create_unknown_env by using extend method
1 parent 16e061f commit d7f2cd8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

crates/pet/src/locators.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,7 @@ fn create_unknown_env(
171171
// that redirect to the real Python installation.
172172
let mut symlinks = resolved_env.symlinks.clone().unwrap_or_default();
173173
if let Some(additional_symlinks) = find_symlinks(&resolved_env.executable) {
174-
for symlink in additional_symlinks {
175-
if !symlinks.contains(&symlink) {
176-
symlinks.push(symlink);
177-
}
178-
}
174+
symlinks.extend(additional_symlinks);
179175
}
180176
symlinks.sort();
181177
symlinks.dedup();

0 commit comments

Comments
 (0)