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 <noreply@anthropic.com>
This commit is contained in:
vangel76andClaude Sonnet 5.5 committed 2026-11-04 01:40:30 +01:00
1 parent 715baf4760
commit bc563f504a
2 files changed
+2 -4

No files matched your search

+1 -1
View File
@@ -179,7 +179,7 @@ pub struct Permit(Arc<AtomicUsize>);
impl ConnectionLimiter {
pub fn try_acquire(&self, max: usize) -> Option<Permit> {
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()))
}
}
+1 -3
View File
@@ -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) };