Peekable::peek(): Use Option::as_ref()
This commit is contained in:
parent
ac919fcd9d
commit
ed0230ee56
@ -1341,10 +1341,7 @@ impl<I: Iterator> Peekable<I> {
|
||||
if self.peeked.is_none() {
|
||||
self.peeked = self.iter.next();
|
||||
}
|
||||
match self.peeked {
|
||||
Some(ref value) => Some(value),
|
||||
None => None,
|
||||
}
|
||||
self.peeked.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user