Repository navigation
chore(rust): adopt Rust 1.100 trim helpers and the unused-dependency lint - #317
Merged
Merged
Conversation
…lint Replace strip_prefix/strip_suffix followed by unwrap_or(self) with the standard trim_prefix/trim_suffix, raise rust-version to 1.100, and deny cargo::unused_dependencies across the workspace.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
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.
Summary
strip_prefix(p).unwrap_or(s)/strip_suffix(p).unwrap_or(s)with the standardtrim_prefix/trim_suffix(stable since Rust 1.100). Same result: the prefix or suffix is removed once if present, otherwise the input is returned unchanged.cargo::unused_dependencieslint atdenyin[workspace.lints.cargo](members already inherit workspace lints). It reports a normal or build dependency that no target of the package uses, when all of its targets are built (cargo check,cargo clippy --all-targets,cargo build); partial builds such as--libreport nothing.warnwould not fail CI, because-D warningsreaches rustc lints only.rust-versionto 1.100 (required by the new string helpers).Test plan
Summary by CodeRabbit