Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhanLiin committed Nov 30, 2023
1 parent 5ec046d commit b4c8ca8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/histbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,10 @@ impl<T, const N: usize> HistoryBuffer<T, N> {
pub fn oldest_index(&self) -> Option<usize> {
if self.filled {
Some(self.write_at)
} else if self.write_at == 0 {
None
} else {
if self.write_at == 0 {
None
} else {
Some(0)
}
Some(0)
}
}

Expand Down

0 comments on commit b4c8ca8

Please sign in to comment.