refactor(allocator): use stabilized AtomicUsize::update#24382
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
overlookmotel
approved these changes
Jul 11, 2026
Member
Merge activity
|
Rust 1.95 stabilized [`Atomic*::update`](https://doc.rust-lang.org/std/sync/atomic/struct.AtomicUsize.html#method.update) (MSRV bumped in #24359), the infallible sibling of `fetch_update` for closures that always produce a new value. Both `fetch_update` call sites (`oxc_allocator/src/tracking.rs` and `tasks/track_memory_allocations`) used an always-`Some` closure, so they gain nothing from the fallible API — switching to `update` drops the ignored `Result` (`let _ =`) and the "cannot be `Err`" comments. Same CAS-loop semantics; `saturating_add` behavior unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
graphite-app
Bot
force-pushed
the
refactor-atomic-update
branch
from
July 11, 2026 17:40
81b11f1 to
b889093
Compare
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.95 stabilized
Atomic*::update(MSRV bumped in #24359), the infallible sibling offetch_updatefor closures that always produce a new value.Both
fetch_updatecall sites (oxc_allocator/src/tracking.rsandtasks/track_memory_allocations) used an always-Someclosure, so they gain nothing from the fallible API — switching toupdatedrops the ignoredResult(let _ =) and the "cannot beErr" comments. Same CAS-loop semantics;saturating_addbehavior unchanged.🤖 Generated with Claude Code