chore: additional clippy fixes#661
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses additional clippy (Rust linter) warnings and improves code quality. The changes focus on applying clippy suggestions to make the codebase more idiomatic and efficient.
- Replace
to_string()calls with more efficientclone()operations on existing strings - Refactor variable declarations to use more idiomatic patterns
- Update match patterns to use
Self::instead of explicit enum names - Add clippy allow attributes for specific cases where warnings are acceptable
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| xtask/src/main.rs | Add backticks around shell names in documentation comments |
| brush-parser/src/error.rs | Replace enum patterns with Self:: and add clippy allow attribute |
| brush-core/src/variables.rs | Replace to_string() with clone() for existing string |
| brush-core/src/shell.rs | Replace map_or with map_or_else for lazy evaluation |
| brush-core/src/completion.rs | Replace to_string() with clone() for existing string |
| brush-core/src/builtins/set.rs | Add clippy allow attribute for useless_let_if_seq |
| brush-core/src/builtins/return_.rs | Refactor variable declaration to use if-let expression |
| brush-core/src/builtins/exit.rs | Refactor variable declaration to use if-let expression |
| .github/workflows/ci.yaml | Add --workspace flag to clippy command |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Test Results 3 files 20 suites 5m 4s ⏱️ Results for commit af27462. ♻️ This comment has been updated with latest results. |
Performance Benchmark Report
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is Test Summary: bash-completion test suite
|
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.
No description provided.