From 78957ff85bbe800175dd47b0724df713ce90525b Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 29 Jan 2025 11:36:35 +0200 Subject: [PATCH] enshort construction --- src/app/browser/window/tab/item/action/load.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/browser/window/tab/item/action/load.rs b/src/app/browser/window/tab/item/action/load.rs index 88e83f91..e11da482 100644 --- a/src/app/browser/window/tab/item/action/load.rs +++ b/src/app/browser/window/tab/item/action/load.rs @@ -34,14 +34,7 @@ impl Load { /// with formatted for this action [Variant](https://docs.gtk.org/glib/struct.Variant.html) value pub fn activate(&self, request: Option<&str>, is_history: bool) { self.simple_action.activate(Some( - &( - match request { - Some(value) => String::from(value), - None => String::new(), - }, - is_history, - ) - .to_variant(), + &(request.unwrap_or_default(), is_history).to_variant(), )); }