Skip to content

Replace deprecated compare_and_swap with compare_exchange#7

Merged
taiki-e merged 1 commit intosmol-rs:masterfrom
taiki-e:compare_and_swap
Dec 24, 2020
Merged

Replace deprecated compare_and_swap with compare_exchange#7
taiki-e merged 1 commit intosmol-rs:masterfrom
taiki-e:compare_and_swap

Conversation

@taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Dec 24, 2020

compare_and_swap is deprecated in 1.50. (rust-lang/rust#79261)
This patch replaces the uses of compare_and_swap with compare_exchange.

See also the document about compare_and_swap -> compare_exchange(_weak) migration: https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicUsize.html#migrating-to-compare_exchange-and-compare_exchange_weak

@taiki-e taiki-e requested a review from a user December 24, 2020 12:31
@taiki-e taiki-e merged commit 52573f7 into smol-rs:master Dec 24, 2020
@taiki-e taiki-e deleted the compare_and_swap branch December 24, 2020 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant