From 27f778e231c6cffaf11ba655b617f3bb12adf937 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 13 Dec 2024 02:31:22 +0200 Subject: [PATCH] remove duplicated constructions --- src/app/browser/window/tab/item/page/navigation/home.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/browser/window/tab/item/page/navigation/home.rs b/src/app/browser/window/tab/item/page/navigation/home.rs index d2b344b8..52a4b720 100644 --- a/src/app/browser/window/tab/item/page/navigation/home.rs +++ b/src/app/browser/window/tab/item/page/navigation/home.rs @@ -45,11 +45,11 @@ impl Home { let scheme = uri.scheme(); let port = uri.port(); if let Some(host) = uri.host() { - if port.is_positive() { - return Some(gformat!("{scheme}://{host}:{port}/")); + return Some(if port.is_positive() { + gformat!("{scheme}://{host}:{port}/") } else { - return Some(gformat!("{scheme}://{host}/")); - } // @TODO auth params + gformat!("{scheme}://{host}/") + }); } } None