From bc563f504a65c3040932603a6aaf07f2eba06172 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Wed, 4 Nov 2026 01:40:30 +0100 Subject: [PATCH] Fix the remaining Rust 1.99 clippy findings Use slice fill in the particles test (manual_slice_fill) and AtomicUsize::try_update, the renamed fetch_update, in the connection limiter. Both are behaviour-neutral. Refs #233 Co-Authored-By: Claude Sonnet 5.5 --- crates/automation/src/security.rs | 2 +- crates/paint/src/particles.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/automation/src/security.rs b/crates/automation/src/security.rs index 0f5e6ab5..7613ecd5 100644 --- a/crates/automation/src/security.rs +++ b/crates/automation/src/security.rs @@ -179,7 +179,7 @@ pub struct Permit(Arc); impl ConnectionLimiter { pub fn try_acquire(&self, max: usize) -> Option { - self.0.fetch_update(Ordering::AcqRel, Ordering::Acquire, |n| (n < max).then_some(n + 1)).ok().map(|_| Permit(self.0.clone())) + self.0.try_update(Ordering::AcqRel, Ordering::Acquire, |n| (n < max).then_some(n + 1)).ok().map(|_| Permit(self.0.clone())) } } diff --git a/crates/paint/src/particles.rs b/crates/paint/src/particles.rs index 64ec2dde..ad81732e 100644 --- a/crates/paint/src/particles.rs +++ b/crates/paint/src/particles.rs @@ -83,9 +83,7 @@ mod tests { for p in &mut m.positions { *p = Vec3::new(p.x, -p.z, 0.0); } - for n in &mut m.normals { - *n = Vec3::Z; - } + m.normals.fill(Vec3::Z); let bvh = Bvh::new(&m); let cam = OrbitCamera::default(); let ctx = PickCtx { mesh: &m, bvh: &bvh, camera: &cam, viewport: Vec2::new(100.0, 100.0) };