Skip to content

ci: clean up clippy 1.99 lints - #11

Open
thedancingdeveloper wants to merge 2 commits into
mainfrom
wi-1472-clippy-199
Open

thedancingdeveloper wants to merge 2 commits into
mainfrom
wi-1472-clippy-199

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Owner

Summary

  • GitHub runners are on Rust 1.99, and cargo clippy --workspace --all-targets -- -D warnings fails every PR.
  • Drop redundant & in format!/println! (useless_borrows_in_formatting) in crates/gpui/build.rs and hello_world.
  • Type taffy length/fr literals as f32 (float_literal_f32_fallback).
  • Use std::f32::consts::GOLDEN_RATIO instead of the approximate literal (approx_constant). A local f32 module makes the bare path ambiguous.
  • Remove unused 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, and cargo test --workspace.

Test plan

  • Linux test job (fmt, clippy -D warnings, cargo test --workspace) is green
  • macOS is out of scope

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant