From bd766a2154875e4aa1e22b22dde167a5311fea7b Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 23 Jan 2025 14:40:48 +0200 Subject: [PATCH] apply clippy corrections --- .../browser/window/tab/item/page/navigation/request.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/browser/window/tab/item/page/navigation/request.rs b/src/app/browser/window/tab/item/page/navigation/request.rs index dc7e0bf1..c5751d17 100644 --- a/src/app/browser/window/tab/item/page/navigation/request.rs +++ b/src/app/browser/window/tab/item/page/navigation/request.rs @@ -121,8 +121,8 @@ impl Request { /// Parse home [Uri](https://docs.gtk.org/glib/struct.Uri.html) of `Self` pub fn home(&self) -> Option { - match self.uri() { - Some(uri) => Some(Uri::build( + self.uri().map(|uri| { + Uri::build( UriFlags::NONE, &uri.scheme(), uri.userinfo().as_deref(), @@ -131,9 +131,8 @@ impl Request { "/", None, None, - )), - None => None, - } + ) + }) } /// Get request value in `download:` format