Repository navigation
ci: clean up clippy 1.99 lints - #11
Open
thedancingdeveloper wants to merge 2 commits into
Open
thedancingdeveloper wants to merge 2 commits into
thedancingdeveloper wants to merge 2 commits into
Conversation
Rust 1.99's -D warnings fails the Linux test job on useless_borrows_in_formatting, float_literal_f32_fallback, approx_constant, and unused imports. Drop the borrows, type the f32 literals, use GOLDEN_RATIO, and remove unused AppContext imports.
The Linux test step links gpui against libxcb, libxkbcommon and libxkbcommon-x11. GitHub's ubuntu-latest no longer ships the dev packages, so the link fails after clippy is clean.
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 --workspace --all-targets -- -D warningsfails every PR.&informat!/println!(useless_borrows_in_formatting) incrates/gpui/build.rsandhello_world.length/frliterals asf32(float_literal_f32_fallback).std::f32::consts::GOLDEN_RATIOinstead of the approximate literal (approx_constant). A localf32module makes the bare path ambiguous.AppContext as _imports in fluent-layout and fluent-primitives tests.Verified locally on rustc 1.99.0:
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test --workspace.Test plan
testjob (fmt, clippy-D warnings,cargo test --workspace) is green