From efce42b39421475868152b23dd547a2e4bb192c0 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 17 Oct 2016 09:21:08 +0200 Subject: [PATCH] Remove DeleteIter --- libimagentrylink/src/internal.rs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/libimagentrylink/src/internal.rs b/libimagentrylink/src/internal.rs index 9c7648ff..655da053 100644 --- a/libimagentrylink/src/internal.rs +++ b/libimagentrylink/src/internal.rs @@ -76,10 +76,6 @@ pub mod iter { GetIter(self.0, store) } - pub fn into_deleter(self, store: &Store) -> DeleteIter { - DeleteIter(self.0, store) - } - } impl Iterator for LinkIter { @@ -147,24 +143,6 @@ pub mod iter { } - /// An Iterator that `Store::get()`s the Entries from the store while consumed - pub struct DeleteIter<'a>(IntoIter, &'a Store); - - impl<'a> DeleteIter<'a> { - fn new(i: IntoIter, store: &'a Store) -> DeleteIter<'a> { - DeleteIter(i, store) - } - } - - impl<'a> Iterator for DeleteIter<'a> { - type Item = Result<()>; - - fn next(&mut self) -> Option { - self.0.next().map(|id| self.1.delete(id).map_err_into(LEK::StoreReadError)) - } - - } - /// An iterator that removes all Items from the iterator that are not linked anymore by calling /// `Store::delete()` on them. ///