fix(clippy): rename deprecated fetch_update to try_update - #633
Merged
Merged
Conversation
Rust 1.99.0 renames AtomicUsize::fetch_update to try_update for consistency. Refs DIG-Network/dig_ecosystem#3442
Contributor
Author
|
PASS - security audit, #633 (ticket dig_ecosystem#3442) Head audited: 773ae94
Not covered: toolchain behaviour of |
MichaelTaylor3d
commented
Oct 2, 2026
MichaelTaylor3d
left a comment
Contributor
Author
There was a problem hiding this comment.
Verdict: PASS at head 773ae94 (reviewed read-only; no code edited).
Criteria checked:
- Semantics identical. Read core/src/sync/atomic.rs of the installed stable toolchain (rustc 1.98.1):
fetch_updateis a literal alias,#[deprecated(since = "1.99.0", note = "renamed to try_update")], whose body isself.try_update(set_order, fetch_order, f). Both have signature(set_order, fetch_order, f) -> Result<T, T>with Ok(previous) / Err(current). Same argument order, same return meaning. - Orderings unchanged at both sites: coinset_resolver.rs:418 and module_reshare.rs:1625 stay
SeqCst, SeqCst; closures untouched. Diff is exactly +1/-1 per file. - Toolchain admits it: no rust-toolchain file; CI uses
dtolnay/rust-toolchain@stableandrustup toolchain install stable.try_updateis#[stable(since = "1.95.0")], and the 1.99 clippy that fails #632 is newer. The onlyrust-versionin the repo is 1.75.0 in crates/dig-chat-protocol, which has nofetch_updateortry_update, so it does not apply. Both changed sites are inmod testsof dig-node-core. - No remaining uses:
grep -rn fetch_updateover the whole tree at this head (target, .git, node_modules excluded) returns zero hits. - Checks: all 13 checks on #633 pass, including Clippy, Rustfmt, Test + coverage and CodeQL.
Not run: a local build under rust 1.99 (installed toolchain is 1.98.1, which compiles try_update; the CI Clippy pass covers the lint). Test-vacuity gate does not apply: a lint-only rename that changes no behaviour, so there is no fix to revert.
Threads: none opened, none open.
MichaelTaylor3d
marked this pull request as ready for review
October 2, 2026 05:30
MichaelTaylor3d
added a commit
that referenced
this pull request
Oct 2, 2026
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.
Rust 1.99.0 (2026-09-28) renames
AtomicUsize::fetch_updatetotry_updatefor consistency with the standard library. This PR updates the two deprecated calls in dig-node-core.Refs DIG-Network/dig_ecosystem#3442
Run: 36951759927