Remove DeleteIter

This commit is contained in:
Matthias Beyer 2016-10-17 09:21:08 +02:00
parent 0eda8e2d04
commit efce42b394

View file

@ -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<Link>, &'a Store);
impl<'a> DeleteIter<'a> {
fn new(i: IntoIter<Link>, store: &'a Store) -> DeleteIter<'a> {
DeleteIter(i, store)
}
}
impl<'a> Iterator for DeleteIter<'a> {
type Item = Result<()>;
fn next(&mut self) -> Option<Self::Item> {
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.
///