Skip to content

Commit 8a79c63

Browse files
authored
Cleanup and fixes (#148)
1 parent 202c526 commit 8a79c63

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

crates/pet-core/src/os_environment.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ impl Environment for EnvironmentApi {
5050
if self.global_search_locations.lock().unwrap().is_empty() {
5151
let mut paths =
5252
env::split_paths(&self.get_env_var("PATH".to_string()).unwrap_or_default())
53-
.into_iter()
5453
.filter(|p| p.exists())
5554
.collect::<Vec<PathBuf>>();
5655
trace!("Env PATH: {:?}", paths);

crates/pet-windows-registry/src/environments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fn get_registry_pythons_from_key_for_company(
101101
Ok(install_path_key) => {
102102
let env_path: String =
103103
install_path_key.get_value("").ok().unwrap_or_default();
104-
let env_path = norm_case(&PathBuf::from(env_path));
104+
let env_path = norm_case(PathBuf::from(env_path));
105105
if is_windows_app_folder_in_program_files(&env_path) {
106106
trace!(
107107
"Found Python ({}) in {}\\Software\\Python\\{}\\{}, but skipping as this is a Windows Store Python",
@@ -144,7 +144,7 @@ fn get_registry_pythons_from_key_for_company(
144144
);
145145
continue;
146146
}
147-
let executable = norm_case(&PathBuf::from(executable));
147+
let executable = norm_case(PathBuf::from(executable));
148148
if !executable.exists() {
149149
warn!(
150150
"Python executable ({}) file not found for {}\\Software\\Python\\{}\\{}",

crates/pet-windows-store/src/environments.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ lazy_static! {
3232
}
3333

3434
#[derive(Default)]
35+
#[allow(dead_code)]
3536
struct PotentialPython {
3637
#[allow(dead_code)]
3738
path: Option<PathBuf>,

crates/pet-windows-store/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl Locator for WindowsStore {
7474
}
7575
let list_of_possible_exes = vec![env.executable.clone()]
7676
.into_iter()
77-
.chain(env.symlinks.clone().unwrap_or_default().into_iter())
77+
.chain(env.symlinks.clone().unwrap_or_default())
7878
.collect::<Vec<PathBuf>>();
7979
if let Some(environments) = self.find_with_cache() {
8080
for found_env in environments {

crates/pet/src/locators.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ fn find_symlinks(executable: &PathBuf) -> Option<Vec<PathBuf>> {
200200
}
201201

202202
#[cfg(windows)]
203+
#[allow(clippy::ptr_arg)]
203204
fn find_symlinks(_executable: &PathBuf) -> Option<Vec<PathBuf>> {
204205
// In windows we will need to spawn the Python exe and then get the exes.
205206
// Lets wait and see if this is necessary.

0 commit comments

Comments
 (0)