From e1dd70643226b0b221243850b20ff001648c6ed7 Mon Sep 17 00:00:00 2001 From: glowcoil Date: Tue, 26 Mar 2024 11:38:52 -0500 Subject: [PATCH] rename sync::params::ParamChanges iterator to Poll --- src/sync/params.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sync/params.rs b/src/sync/params.rs index d5c650b..07a2046 100644 --- a/src/sync/params.rs +++ b/src/sync/params.rs @@ -22,20 +22,20 @@ impl ParamValues { self.dirty.set(index, Ordering::Release); } - pub fn poll(&self) -> ParamChanges { - ParamChanges { + pub fn poll(&self) -> Poll { + Poll { values: &self.values, iter: self.dirty.drain(Ordering::Acquire), } } } -pub struct ParamChanges<'a> { +pub struct Poll<'a> { values: &'a [AtomicF64], iter: bitset::Drain<'a>, } -impl<'a> Iterator for ParamChanges<'a> { +impl<'a> Iterator for Poll<'a> { type Item = (usize, ParamValue); fn next(&mut self) -> Option {