aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/rbw/commands.rs')
-rw-r--r--src/bin/rbw/commands.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs
index 703a351..fce2d15 100644
--- a/src/bin/rbw/commands.rs
+++ b/src/bin/rbw/commands.rs
@@ -760,9 +760,7 @@ impl DecryptedUri {
}
fn host_port(url: &Url) -> Option<String> {
- let Some(host) = url.host_str() else {
- return None;
- };
+ let host = url.host_str()?;
Some(
url.port().map_or_else(
|| host.to_string(),
@@ -772,9 +770,7 @@ fn host_port(url: &Url) -> Option<String> {
}
fn domain_port(url: &Url) -> Option<String> {
- let Some(domain) = url.domain() else {
- return None;
- };
+ let domain = url.domain()?;
Some(url.port().map_or_else(
|| domain.to_string(),
|port| format!("{domain}:{port}"),