From 19e4878460155a110d874a1cfa3e2e61cf998eb6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 27 Dec 2022 15:51:30 +0100 Subject: [PATCH] Fix clippy: Replace manual return with ? operator Signed-off-by: Matthias Beyer --- src/entities/itemsiter.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/entities/itemsiter.rs b/src/entities/itemsiter.rs index d8df189..9769762 100644 --- a/src/entities/itemsiter.rs +++ b/src/entities/itemsiter.rs @@ -90,9 +90,7 @@ impl<'a, T: Clone + for<'de> Deserialize<'de> + Serialize> ItemsIter { Some((item, this)) } else { if this.need_next_page() { - if this.fill_next_page().await.is_none() { - return None; - } + this.fill_next_page().await?; } let idx = this.cur_idx; this.cur_idx += 1;