Fix all clippy warnings across workspace including Windows-specific conditional compilation #251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves all clippy warnings when running
cargo clippy --workspace --all-targets -- -D warningsand applies consistent code formatting across both Unix and Windows build targets.Issues Fixed
Import and Configuration Issues
pet-corethat were only used on Windowscifeature flag topet-poetry/Cargo.tomlto resolve unexpected cfg condition warningsCode Structure Issues
impl Environment for TestEnvironmentblocks outside of functions in:pet-poetry/tests/common.rspet-pyenv/tests/common.rspet-conda/tests/common.rsWindows-Specific Conditional Compilation Issues
#[cfg(windows)]functions to module level with proper conditional guards in:pet-windows-store/src/lib.rspet-windows-registry/src/environments.rspet-windows-store/src/environments.rsuse pet_fs::path::norm_caseimport inpet-conda/src/environment_locations.rsCode Quality Improvements
pet/tests/ci_test.rsDefault::default()+ field assignment pattern with struct initialization syntaxreturnstatements&Vec<T>to&[T]and&Stringto&strfor better performance..Default::default()where all fields were explicitly specifiedTesting
All changes maintain existing functionality:
cargo build- Project compiles successfullycargo clippy --workspace --all-targets -- -D warnings- No warnings on both Unix and Windows targetscargo fmt --all- Code formatted consistentlyThe fixes are purely cosmetic and don't change any runtime behavior, ensuring existing tests and functionality remain intact across all supported platforms.
Created from VS Code via the GitHub Pull Request extension.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.