From 2407597870300fe6773b38ef8b06fdc11d73106a Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Thu, 23 Feb 2023 20:34:28 +0800 Subject: [PATCH] clippy --- src/executor/paginator.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/executor/paginator.rs b/src/executor/paginator.rs index 5cbe2b80..6ca07569 100644 --- a/src/executor/paginator.rs +++ b/src/executor/paginator.rs @@ -194,12 +194,8 @@ where /// ``` pub fn into_stream(mut self) -> PinBoxStream<'db, Result, 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); } }) }