1
0
Fork 0

Rename reset_iter to iter_mut

So it's more consistent.
This commit is contained in:
Robbert van der Helm 2022-02-12 23:28:15 +01:00
parent 2c394aabd5
commit eea05cc748
2 changed files with 4 additions and 3 deletions

View file

@ -198,7 +198,7 @@ impl Plugin for Diopser {
for filter_idx in 0..self.params.filter_stages.value as usize {
// Because of this filter_idx outer loop we can't directly iterate over
// `channel_samples` as the iterator would be empty after the first loop
for (sample, filters) in channel_samples.reset_iter().zip(self.filters.iter_mut()) {
for (sample, filters) in channel_samples.iter_mut().zip(self.filters.iter_mut()) {
*sample = filters[filter_idx].process(*sample);
}
}

View file

@ -125,8 +125,9 @@ impl<'outer, 'inner> Iterator for Channels<'outer, 'inner> {
impl<'outer, 'inner> ExactSizeIterator for Channels<'outer, 'inner> {}
impl<'outer, 'inner> Channels<'outer, 'inner> {
/// A resetting iterator. This lets you iterate over the same channels multiple times.
pub fn reset_iter(&mut self) -> &mut Self {
/// A resetting iterator. This lets you iterate over the same channels multiple times. Otherwise
/// you don't need to use this function as [Channels] already implements [Iterator].
pub fn iter_mut(&mut self) -> &mut Self {
self.current_channel = 0;
self
}