Skip to content

fix: satisfy the Rust 1.99 clippy - #874

Merged
xintaofei merged 1 commit into
mainfrom
fix/rust-1-99-clippy
Oct 2, 2026
Merged

xintaofei merged 1 commit into
mainfrom
fix/rust-1-99-clippy

Conversation

@xintaofei

Copy link
Copy Markdown
Owner

GitHub's runners moved to stable Rust 1.99 on 2026-10-01. Its clippy rejects three things that were clean under 1.98, so cargo clippy -- -D warnings now fails on main and on every pull request based on it:

  • double_must_use: async-trait 0.1.89 marks every generated method #[must_use] on top of a future that already is. async-trait 0.1.92 no longer adds the attribute.
  • Deprecated fetch_update: AtomicUsize::fetch_update is deprecated in favour of try_update, which has been stable since 1.95. Both calls now use try_update.
  • single_element_loop on Windows: Windows has no short scratch root, so sweep_roots loops over a single element there. The loop keeps its one element, with the lint allowed on Windows.

This is the same commit as 35a40ae on #870, cherry-picked onto main so that main and the open pull requests go green without waiting for #870.

Verified with cargo +1.99.0 clippy ... -- -D warnings using CI's own arguments:

Target Desktop (--all-targets --features test-utils) Server (--no-default-features --bin codeg-server --lib)
macOS clean clean
Windows (cross, x86_64-pc-windows-gnu) clean clean

🤖 Generated with Claude Code

Rust 1.99's clippy rejects code that was clean under 1.98. async-trait
0.1.89 marks every generated method #[must_use] on top of a future that
already is (double_must_use); AtomicUsize::fetch_update is deprecated in
favour of try_update, stable since 1.95; and on Windows, which has no
short scratch root, sweep_roots loops over a single element.

async-trait 0.1.92 no longer adds the attribute, the two calls use
try_update, and the loop keeps its one element on Windows.
@xintaofei
xintaofei merged commit a9a4295 into main Oct 2, 2026
7 checks passed
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