Closed
Conversation
…nd function restructuring Co-authored-by: karthiknadig <3840081+karthiknadig@users.noreply.github.com>
…, and cfg conditions Co-authored-by: karthiknadig <3840081+karthiknadig@users.noreply.github.com>
…ersions, assert_eq with bool Co-authored-by: karthiknadig <3840081+karthiknadig@users.noreply.github.com>
…arg issues Co-authored-by: karthiknadig <3840081+karthiknadig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Running
Fix all clippy warnings across the workspace
Sep 3, 2025
cargo clippy --workspace --all-targets -- -D warnings seems to raise a lot of errors. Can you fix them?
Member
|
@copilot Please also run cargo fmt |
Co-authored-by: karthiknadig <3840081+karthiknadig@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Running
cargo clippy --workspace --all-targets -- -D warningswas failing with 46+ clippy errors across multiple crates, preventing the use of strict clippy checking in CI/CD pipelines.Changes Made
Critical Structural Issues
impl Environment for TestEnvironmentblocks outside of functions in test modules acrosspet-conda,pet-poetry, andpet-pyenvcratesuse super::*only for Windows builds) and removed unusedPathBufimportspet-python-utilsAPI & Function Signature Improvements
&Stringto&strin function parameters (5 instances)&Vec<T>with&[T]for better performanceexpect(format!(...).as_str())withunwrap_or_else(|| panic!(...))to avoid unnecessary allocationsCode Style & Optimization
assert_eq!(value, true/false)withassert!(value)orassert!(!value)Default::default()+ field assignment.to_string()calls andPathBuf::from()conversionsTest Configuration
feature = "ci"with proper#[test]attributesCode Formatting
cargo fmt --allto ensure consistent formatting across all workspace cratesVerification
The following commands now pass without any warnings or errors:
All changes are minimal and surgical, preserving existing functionality while improving code quality, performance, and maintainability. No breaking changes were introduced.
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.