summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-08-09 13:37:13 +0200
committerMatthias Beyer <mail@beyermatthias.de>2022-08-09 13:37:14 +0200
commit9115ef53a0522819aaecc74b462d696c1b10a942 (patch)
treedd6d54416a73d7489eccc841b1bc26a23b1ca5a4
parent9350724be325f1e97074abcab1816daf5f6a79c4 (diff)
Fix clippy: use by_ref()
This fixes clippy::while-let-on-iterator Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/iter.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/iter.rs b/src/iter.rs
index 4dbe1cc..5410f0a 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -19,7 +19,7 @@ where
type Item = T;
fn next(&mut self) -> Option<Self::Item> {
- while let Some(next) = self.1.next() {
+ while let Some(next) = self.1.by_ref().next() {
if self.0.filter(&next) {
return Some(next);
}
@@ -55,7 +55,7 @@ where
type Item = Result<T, E>;
fn next(&mut self) -> Option<Self::Item> {
- while let Some(next) = self.0.next() {
+ while let Some(next) = self.0.by_ref().next() {
match next {
Err(e) => return Some(Err(e)),
Ok(t) => {
@@ -101,7 +101,7 @@ where
type Item = Result<T, E>;
fn next(&mut self) -> Option<Self::Item> {
- while let Some(next) = self.0.next() {
+ while let Some(next) = self.0.by_ref().next() {
match next {
Ok(t) => return Some(Ok(t)),
Err(e) => {