Skip to content

Commit ff4628c

Browse files
committed
mob next [ci-skip] [ci skip] [skip ci]
1 parent 90bdeb6 commit ff4628c

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/adaptors/mod.rs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -877,25 +877,36 @@ impl<I,T,E> Iterator for EnumerateOk<I>
877877
// Some(Ok(v)) =>
878878
// {
879879
// let index = self.index;
880-
881880
// self.index += 1;
882-
883881
// Some(Ok((index, v)))
884882
// }
885883
// Some(Err(e)) => Some(Err(e)),
886884
// None => None
887885
// }
888886
// }
889887

888+
// fn next(&mut self) -> Option<Self::Item> {
889+
// self.iter.next().map(|item| {
890+
// match item {
891+
// Ok(v) => {
892+
// let index = self.index;
893+
// self.index += 1;
894+
// Ok((index,v))
895+
// },
896+
// Err(e) => Err(e),
897+
// }
898+
// })
899+
// }
900+
890901
fn next(&mut self) -> Option<Self::Item> {
891902
self.iter.next().map(|item| {
892-
match item {
893-
Ok(v) => {
894-
895-
},
896-
e => e
903+
item.map(|v| {
904+
let index = self.index;
905+
self.index +=1;
906+
(index,v)
897907
}
898-
})
908+
);
909+
};
899910
}
900911
}
901912

0 commit comments

Comments
 (0)