aboutsummaryrefslogtreecommitdiff
path: root/src/api/icons.rs
diff options
context:
space:
mode:
authorBlackDex <[email protected]>2022-12-29 14:11:52 +0100
committerMathijs van Veluw <[email protected]>2023-01-09 19:12:51 +0100
commitd30878c4eaf71c2fd4c799bd9174a2abe09a7b62 (patch)
treed187bfe53e6b1e034967b1e3c5ef7bb0790a6156 /src/api/icons.rs
parent988d24927ea3b586331e02e33fa8648eb9d8fc8f (diff)
downloadvaultwarden-d30878c4eaf71c2fd4c799bd9174a2abe09a7b62.tar.gz
vaultwarden-d30878c4eaf71c2fd4c799bd9174a2abe09a7b62.zip
Resolve uninlined_format_args clippy warnings
The upcomming release of Rust 1.67.0 will warn on `uninlined_format_args`. This PR resolves that by inlining all these items. It also looks nicer.
Diffstat (limited to 'src/api/icons.rs')
-rw-r--r--src/api/icons.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/icons.rs b/src/api/icons.rs
index 509e88c0..23d122f1 100644
--- a/src/api/icons.rs
+++ b/src/api/icons.rs
@@ -130,7 +130,7 @@ fn is_valid_domain(domain: &str) -> bool {
const ALLOWED_CHARS: &str = "_-.";
// If parsing the domain fails using Url, it will not work with reqwest.
- if let Err(parse_error) = url::Url::parse(format!("https://{}", domain).as_str()) {
+ if let Err(parse_error) = url::Url::parse(format!("https://{domain}").as_str()) {
debug!("Domain parse error: '{}' - {:?}", domain, parse_error);
return false;
} else if domain.is_empty()
@@ -575,7 +575,7 @@ async fn get_page_with_referer(url: &str, referer: &str) -> Result<Response, Err
match client.send().await {
Ok(c) => c.error_for_status().map_err(Into::into),
- Err(e) => err_silent!(format!("{}", e)),
+ Err(e) => err_silent!(format!("{e}")),
}
}
@@ -797,7 +797,7 @@ impl reqwest::cookie::CookieStore for Jar {
let cookie_store = self.0.read().unwrap();
let s = cookie_store
.get_request_values(url)
- .map(|(name, value)| format!("{}={}", name, value))
+ .map(|(name, value)| format!("{name}={value}"))
.collect::<Vec<_>>()
.join("; ");