This commit is contained in:
Billy Chan 2023-02-23 20:34:28 +08:00
parent f03a1761ac
commit 2407597870
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7

View File

@ -194,12 +194,8 @@ where
/// ```
pub fn into_stream(mut self) -> PinBoxStream<'db, Result<Vec<S::Item>, DbErr>> {
Box::pin(stream! {
loop {
if let Some(vec) = self.fetch_and_next().await? {
yield Ok(vec);
} else {
break
}
while let Some(vec) = self.fetch_and_next().await? {
yield Ok(vec);
}
})
}