aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2024-01-01 16:06:10 -0500
committerJesse Luehrs <doy@tozt.net>2024-01-01 16:06:30 -0500
commitb9621938865d4ad24d7bcee7fdbfa0c9c45978c8 (patch)
tree35430485e92c6e4c9d9747748e9c775debbe0917 /src/config.rs
parent21e70ce32bdab89adbb66b32c8b69d4b806e5d5f (diff)
downloadrbw-b9621938865d4ad24d7bcee7fdbfa0c9c45978c8.tar.gz
rbw-b9621938865d4ad24d7bcee7fdbfa0c9c45978c8.zip
clippy and fmt
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/config.rs b/src/config.rs
index 557bfc0..efb1b5f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -147,11 +147,11 @@ impl Config {
self.base_url.clone().map_or_else(
|| "https://api.bitwarden.com".to_string(),
|url| {
- let clean_url = format!("{}", url.trim_end_matches('/'));
+ let clean_url = url.trim_end_matches('/').to_string();
if clean_url == "https://api.bitwarden.eu" {
clean_url
} else {
- format!("{}/api", clean_url)
+ format!("{clean_url}/api")
}
},
)
@@ -163,13 +163,13 @@ impl Config {
self.base_url.clone().map_or_else(
|| "https://identity.bitwarden.com".to_string(),
|url| {
- let clean_url = format!("{}", url.trim_end_matches('/'));
+ let clean_url = url.trim_end_matches('/').to_string();
if clean_url == "https://identity.bitwarden.eu" {
clean_url
} else {
- format!("{}/identity", clean_url)
+ format!("{clean_url}/identity")
}
- }
+ },
)
})
}
@@ -180,13 +180,13 @@ impl Config {
self.base_url.clone().map_or_else(
|| "https://notifications.bitwarden.com".to_string(),
|url| {
- let clean_url = format!("{}", url.trim_end_matches('/'));
+ let clean_url = url.trim_end_matches('/').to_string();
if clean_url == "https://notifications.bitwarden.eu" {
clean_url
} else {
- format!("{}/notifications", clean_url)
+ format!("{clean_url}/notifications")
}
- }
+ },
)
})
}