summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-02-22 10:09:03 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-02-22 10:09:03 +0100
commitceb954e835c699255bfabe15a086865bfc4d5d97 (patch)
tree5be76ab9be4ff7fd0636c4ccd42531b98b185fa2
parent20e204905578d943f8fadf5a1770483e97ed4d3c (diff)
fixup! WIP: Add Skip extension where predicate can fail
-rw-r--r--src/skip.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/skip.rs b/src/skip.rs
index bbf0bb6..04eb16c 100644
--- a/src/skip.rs
+++ b/src/skip.rs
@@ -56,32 +56,3 @@ where
}
}
-impl<I, O, E, F> Iterator for SkipWhileMapOk<I, F, O, E>
-where
- I: Iterator<Item = O>,
- F: FnMut(O) -> Result<bool, E>,
-{
- type Item = Result<O, E>;
-
- fn next(&mut self) -> Option<Self::Item> {
- loop {
- match self.iter.next() {
- Some(x) => {
- match (self.func)(x) {
- Ok(true) => return Some(Ok(x)),
- Ok(false) => continue,
- Err(e) => return Some(Err(e)),
- }
- }
- Some(Err(e)) => return Some(Err(e)),
- None => return None,
- }
- }
- }
-
- #[inline]
- fn size_hint(&self) -> (usize, Option<usize>) {
- self.iter.size_hint()
- }
-}
-