Make the use of Self consistent. (#15074)

## Summary

Make the use of `Self` consistent. Mostly done by running `cargo clippy
--fix -- -A clippy::all -W clippy::use_self`.

## Test Plan

<!-- How was it tested? -->
No need.
This commit is contained in:
adamnemecek
2025-08-05 12:17:12 -07:00
committed by GitHub
parent 57f900ad0d
commit 3f83390e34
121 changed files with 1305 additions and 1376 deletions
+5 -5
View File
@@ -85,22 +85,22 @@ impl CondaEnvironmentKind {
fn from_prefix_path(path: &Path) -> Self {
// If we cannot read `CONDA_DEFAULT_ENV`, there's no way to know if the base environment
let Ok(default_env) = env::var(EnvVars::CONDA_DEFAULT_ENV) else {
return CondaEnvironmentKind::Child;
return Self::Child;
};
// These are the expected names for the base environment
if default_env != "base" && default_env != "root" {
return CondaEnvironmentKind::Child;
return Self::Child;
}
let Some(name) = path.file_name() else {
return CondaEnvironmentKind::Child;
return Self::Child;
};
if name.to_str().is_some_and(|name| name == default_env) {
CondaEnvironmentKind::Base
Self::Base
} else {
CondaEnvironmentKind::Child
Self::Child
}
}
}