Repository navigation
Make cargo clippy pass with -D warnings and run it in CI - #117
Merged
Merged
Conversation
Fixes the seven warnings left: a needless borrow twice, a manual starts_with, test helpers after the test module, a clone to make a slice, and a loop over one element. The closure clippy calls redundant in highlight.rs is needed for a lifetime, so that lint is allowed on that line with the reason. CI runs `just lint` on all three platforms, so warnings can't come back unnoticed. Closes #100
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
cargo clippy -D warningsfailed with seven warnings, so CI couldn't run it. This fixes them and addsjust lintto CI on Windows, macOS and Linux.editor/keys.rs: two needless borrows of the clipboard text.editor/pairs.rs:chars().next() != Some(c)becomesstarts_with(c).editor/display.rs: the test-onlyrelayout_with_widthmoves into the test module.files.rstests:std::slice::from_refinstead of a clone, and a one-element loop unrolled.editor/highlight.rs: the closure clippy calls redundant is needed, because passinginjectedbare ties its result to the highlighter's lifetime and doesn't compile. The lint is allowed on that one line, with the reason.Evidence
just lintpasses locally on Windows.cargo test: 494 passed, 0 failed.Risk
CI uses stable Rust, so a new clippy release can add warnings and fail CI until they're fixed. Revert this commit to undo it.
Closes #100