From 28ae313797807ba7819b4b479cdb769f71a3a025 Mon Sep 17 00:00:00 2001 From: Thomas Eppers Date: Sun, 19 Feb 2023 11:48:16 +0100 Subject: [PATCH] more idiomatic code --- src/widget/async_tag_list.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/widget/async_tag_list.rs b/src/widget/async_tag_list.rs index bac4285..d6eebf6 100644 --- a/src/widget/async_tag_list.rs +++ b/src/widget/async_tag_list.rs @@ -169,10 +169,9 @@ impl TagList { } } - //readd next page - match self.tags.as_ref().unwrap().next_page().await { - None => (), - Some(_) => self.lines.push(next_page.unwrap()), + //readd next page item + if let Some(_) = self.tags.as_ref().unwrap().next_page().await { + self.lines.push(next_page.unwrap()); } } },