about summary refs log tree commit diff
path: root/users/edef/weave/src
diff options
context:
space:
mode:
Diffstat (limited to 'users/edef/weave/src')
-rw-r--r--users/edef/weave/src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/users/edef/weave/src/main.rs b/users/edef/weave/src/main.rs
index e8a1990a0df3..243add9047a5 100644
--- a/users/edef/weave/src/main.rs
+++ b/users/edef/weave/src/main.rs
@@ -43,9 +43,11 @@ fn main() -> Result<()> {
         eprint!("… resolve roots\r");
         ph_array.par_iter().enumerate().for_each(|(idx, h)| {
             if let Some(idx_slot) = roots.find(h) {
-                idx_slot
-                    .compare_exchange(INDEX_NULL, idx as u32, Ordering::SeqCst, Ordering::SeqCst)
-                    .expect("duplicate entry");
+                assert_eq!(
+                    idx_slot.swap(idx as u32, Ordering::Relaxed),
+                    INDEX_NULL,
+                    "duplicate entry"
+                );
             }
         });
         eprintln!("{DONE}");