Skip to content

Commit

Permalink
rename sync::params::ParamChanges iterator to Poll
Browse files Browse the repository at this point in the history
  • Loading branch information
micahrj committed Mar 26, 2024
1 parent 2f9fe6a commit e1dd706
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sync/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::Item> {
Expand Down

0 comments on commit e1dd706

Please sign in to comment.