Skip to content

Commit

Permalink
style: fix clippy::redundant_guards lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jan 21, 2024
1 parent 276c6c0 commit fabcb2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cordyceps/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ impl<T: Linked<Links<T>> + ?Sized> List<T> {
let split_idx = match at {
// trying to split at the 0th index. we can just return the whole
// list, leaving `self` empty.
at if at == 0 => return Some(mem::replace(self, Self::new())),
0 => return Some(mem::replace(self, Self::new())),
// trying to split at the last index. the new list will be empty.
at if at == len => return Some(Self::new()),
// we cannot split at an index that is greater than the length of
Expand Down
4 changes: 1 addition & 3 deletions util/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,7 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> {
fn fill_buf(&mut self) -> Result<&[u8]> {
if !self.done_first {
match self.first.fill_buf()? {
buf if buf.is_empty() => {
self.done_first = true;
}
&[] => self.done_first = true,
buf => return Ok(buf),
}
}
Expand Down

0 comments on commit fabcb2b

Please sign in to comment.