The standard library deprecated `compare_and_swap` in favor of `compare_exchange(_weak)` in 1.50. (rust-lang/rust#79261) Given why std `compare_and_swap` was deprecated, it probably makes sense to do the same with `AtomicCell::compare_and_swap`.
The standard library deprecated
compare_and_swapin favor ofcompare_exchange(_weak)in 1.50. (rust-lang/rust#79261)Given why std
compare_and_swapwas deprecated, it probably makes sense to do the same withAtomicCell::compare_and_swap.