fix: satisfy the Rust 1.99 clippy - #874
Merged
Merged
Conversation
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.
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.
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 warningsnow fails onmainand 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.fetch_update:AtomicUsize::fetch_updateis deprecated in favour oftry_update, which has been stable since 1.95. Both calls now usetry_update.single_element_loopon Windows: Windows has no short scratch root, sosweep_rootsloops 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
mainso thatmainand the open pull requests go green without waiting for #870.Verified with
cargo +1.99.0 clippy ... -- -D warningsusing CI's own arguments:--all-targets --features test-utils)--no-default-features --bin codeg-server --lib)x86_64-pc-windows-gnu)🤖 Generated with Claude Code