From d50afbcc1d232e73604e55376a1a7c3ef60ed2b3 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 23 Oct 2026 10:34:42 +0700 Subject: [PATCH] Live Pathfinder budget: lowest set bit without the unstable isolate_lowest_one (rust-version 1.95) --- crates/effects/src/group.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/effects/src/group.rs b/crates/effects/src/group.rs index 05b7eb232..ea646fdad 100644 --- a/crates/effects/src/group.rs +++ b/crates/effects/src/group.rs @@ -120,7 +120,7 @@ impl Counts { let mut i = slot + 1; while let Some(c) = self.0.get_mut(i) { *c += d; - i += i.isolate_lowest_one(); + i += i & i.wrapping_neg(); } } @@ -129,7 +129,7 @@ impl Counts { let (mut i, mut s) = (end.min(self.0.len().saturating_sub(1)), 0); while i > 0 { s += self.0.get(i).copied().unwrap_or(0); - i -= i.isolate_lowest_one(); + i -= i & i.wrapping_neg(); } s }