From b73ca079a8564baef3780ae3c0088e52544c6a6d Mon Sep 17 00:00:00 2001 From: gwenn Date: Thu, 29 Oct 2020 20:01:46 +0100 Subject: [PATCH] Implement Iterator for Batch --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index a7c7680..d500733 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -865,6 +865,14 @@ impl<'conn> fallible_iterator::FallibleIterator for Batch<'conn, '_> { } } +impl<'conn> Iterator for Batch<'conn, '_> { + type Item = Result, Error>; + + fn next(&mut self) -> Option { + fallible_iterator::FallibleIterator::next(self).transpose() + } +} + bitflags::bitflags! { /// Flags for opening SQLite database connections. /// See [sqlite3_open_v2](http://www.sqlite.org/c3ref/open.html) for details.