chore(ksud): enable clippy::all, clippy::pedantic && make clippy happy#2970
Merged
tiann merged 2 commits intotiann:mainfrom Nov 22, 2025
Merged
chore(ksud): enable clippy::all, clippy::pedantic && make clippy happy#2970tiann merged 2 commits intotiann:mainfrom
tiann merged 2 commits intotiann:mainfrom
Conversation
https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate ... and use some #![allow(...)] or #[allow(...)] Signed-off-by: Tools-app <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables stricter Rust linting with clippy::all and clippy::pedantic, then addresses the resulting warnings to improve code quality and maintainability. The changes focus on modernizing Rust idioms, improving formatting consistency, and eliminating deprecated patterns.
- Enabled strict clippy lints (
clippy::all,clippy::pedantic) with targeted exceptions for legitimate cases - Updated to modern Rust patterns (e.g.,
&raw const/&raw mutsyntax,is_some_and,map_or_else) - Improved code readability through better formatting (inline format arguments,
Selfusage,.display()for paths)
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| main.rs | Added clippy lint configuration with #![deny] and selective #![allow] attributes |
| su.rs | Changed parameter passing to use references, simplified control flow, and updated to map_or_else |
| sepolicy.rs | Used Self in enums, made functions const, updated to raw pointer syntax, and improved formatting |
| profile.rs | Removed unnecessary semicolons and changed to use .display() for paths |
| module_config.rs | Made functions const, used Self in matches, improved path formatting with .display() |
| module.rs | Changed visibility from pub(crate) to pub, renamed internal functions, improved formatting |
| metamodule.rs | Changed visibility, simplified nested conditionals, improved path formatting |
| init_event.rs | Changed return types from Result<()> to (), updated slice parameters |
| feature.rs | Changed parameters from String to &str, made functions const, removed unnecessary returns |
| debug.rs | Simplified control flow and improved inline formatting |
| cli.rs | Adjusted imports, adapted to function signature changes |
| boot_patch.rs | Added #![allow] attributes, improved formatting, simplified conditional logic |
| ksucalls.rs | Updated to modern &raw const/&raw mut pointer syntax |
| assets.rs | Changed return types, updated to ok_or_else |
| apk_sign.rs | Updated to use ok_or_else for lazy evaluation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tiann
approved these changes
Nov 22, 2025
u9521
pushed a commit
to u9521/KernelSU
that referenced
this pull request
Jan 4, 2026
tiann#2970) https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate ... and use some #![allow(...)] or #[allow(...)] --------- Signed-off-by: Tools-app <[email protected]> Co-authored-by: weishu <[email protected]>
u9521
pushed a commit
to u9521/KernelSU
that referenced
this pull request
Jan 5, 2026
tiann#2970) https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate ... and use some #![allow(...)] or #[allow(...)] --------- Signed-off-by: Tools-app <[email protected]> Co-authored-by: weishu <[email protected]>
u9521
pushed a commit
to u9521/KernelSU
that referenced
this pull request
Jan 13, 2026
tiann#2970) https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate ... and use some #![allow(...)] or #[allow(...)] --------- Signed-off-by: Tools-app <[email protected]> Co-authored-by: weishu <[email protected]>
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.
https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate ...
and use some #![allow(...)] or #[allow(...)]