Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed Sep 22, 2024
1 parent 80c0816 commit 4d8c879
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/audio_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ impl Ord for SampleInfo {
}

/// Accessor over the captured audio history that helps to identify the
/// timestamp of each sample. Users are supposed to add new data in chunks that
/// are less than the buffer size, to slowly fade out old data from the
/// underlying ringbuffer.
/// timestamp of each sample.
///
/// Users are supposed to add new data in chunks that are less than the buffer
/// size, to slowly fade out old data from the underlying ringbuffer.
#[derive(Debug)]
pub struct AudioHistory {
audio_buffer: ConstGenericRingBuffer<i16, DEFAULT_BUFFER_SIZE>,
Expand Down
2 changes: 1 addition & 1 deletion src/max_min_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<'a> MaxMinIterator<'a> {
let index = RootIterator::new(buffer, Some(index))
.next()
.map(|info| info.index)
.unwrap_or(buffer.data().len() - 1);
.unwrap_or_else(|| buffer.data().len() - 1);
Self { buffer, index }
}
}
Expand Down

0 comments on commit 4d8c879

Please sign in to comment.