Prefer 'match' pattern guard over conditional within body.
This commit is contained in:
parent
8adc3f74f5
commit
c82be2f4cb
@ -393,11 +393,8 @@ fn iter_after<A, I, J>(mut iter: I, mut prefix: J) -> Option<I>
|
||||
loop {
|
||||
let mut iter_next = iter.clone();
|
||||
match (iter_next.next(), prefix.next()) {
|
||||
(Some(x), Some(y)) => {
|
||||
if x != y {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
(Some(ref x), Some(ref y)) if x == y => (),
|
||||
(Some(_), Some(_)) => return None,
|
||||
(Some(_), None) => return Some(iter),
|
||||
(None, None) => return Some(iter),
|
||||
(None, Some(_)) => return None,
|
||||
|
Loading…
Reference in New Issue
Block a user