Skip to content

Commit b4c8ca8

Browse files
committed
Fix clippy
1 parent 5ec046d commit b4c8ca8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/histbuf.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,10 @@ impl<T, const N: usize> HistoryBuffer<T, N> {
248248
pub fn oldest_index(&self) -> Option<usize> {
249249
if self.filled {
250250
Some(self.write_at)
251+
} else if self.write_at == 0 {
252+
None
251253
} else {
252-
if self.write_at == 0 {
253-
None
254-
} else {
255-
Some(0)
256-
}
254+
Some(0)
257255
}
258256
}
259257

0 commit comments

Comments
 (0)