summaryrefslogtreecommitdiff
path: root/cli/cache/http_cache.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-27 10:43:16 -0500
committerGitHub <noreply@github.com>2023-01-27 10:43:16 -0500
commitf5840bdcd360ec0bac2501f333e58e25742b1537 (patch)
tree7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/cache/http_cache.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/cache/http_cache.rs')
-rw-r--r--cli/cache/http_cache.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/cache/http_cache.rs b/cli/cache/http_cache.rs
index 4be3166c9..2e784765e 100644
--- a/cli/cache/http_cache.rs
+++ b/cli/cache/http_cache.rs
@@ -35,7 +35,7 @@ fn base_url_to_filename(url: &Url) -> Option<PathBuf> {
"http" | "https" => {
let host = url.host_str().unwrap();
let host_port = match url.port() {
- Some(port) => format!("{}_PORT{}", host, port),
+ Some(port) => format!("{host}_PORT{port}"),
None => host.to_string(),
};
out.push(host_port);
@@ -128,8 +128,7 @@ impl HttpCache {
io::Error::new(
e.kind(),
format!(
- "Could not create remote modules cache location: {:?}\nCheck the permission of the directory.",
- path
+ "Could not create remote modules cache location: {path:?}\nCheck the permission of the directory."
),
)
})
@@ -231,7 +230,7 @@ mod tests {
headers.insert("etag".to_string(), "as5625rqdsfb".to_string());
let content = b"Hello world";
let r = cache.set(&url, headers, content);
- eprintln!("result {:?}", r);
+ eprintln!("result {r:?}");
assert!(r.is_ok());
let r = cache.get(&url);
assert!(r.is_ok());