Implement Iterator for Batch

This commit is contained in:
gwenn 2020-10-29 20:01:46 +01:00
parent 5f5943435e
commit b73ca079a8

View File

@ -865,6 +865,14 @@ impl<'conn> fallible_iterator::FallibleIterator for Batch<'conn, '_> {
} }
} }
impl<'conn> Iterator for Batch<'conn, '_> {
type Item = Result<Statement<'conn>, Error>;
fn next(&mut self) -> Option<Self::Item> {
fallible_iterator::FallibleIterator::next(self).transpose()
}
}
bitflags::bitflags! { bitflags::bitflags! {
/// Flags for opening SQLite database connections. /// Flags for opening SQLite database connections.
/// See [sqlite3_open_v2](http://www.sqlite.org/c3ref/open.html) for details. /// See [sqlite3_open_v2](http://www.sqlite.org/c3ref/open.html) for details.