summaryrefslogtreecommitdiff
path: root/cli/cache/disk_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/disk_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/disk_cache.rs')
-rw-r--r--cli/cache/disk_cache.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/cache/disk_cache.rs b/cli/cache/disk_cache.rs
index b97850204..799610d5f 100644
--- a/cli/cache/disk_cache.rs
+++ b/cli/cache/disk_cache.rs
@@ -43,8 +43,7 @@ impl DiskCache {
}
fs::create_dir_all(path).map_err(|e| {
io::Error::new(e.kind(), format!(
- "Could not create TypeScript compiler cache location: {:?}\nCheck the permission of the directory.",
- path
+ "Could not create TypeScript compiler cache location: {path:?}\nCheck the permission of the directory."
))
})
}
@@ -61,7 +60,7 @@ impl DiskCache {
let host_port = match url.port() {
// Windows doesn't support ":" in filenames, so we represent port using a
// special string.
- Some(port) => format!("{}_PORT{}", host, port),
+ Some(port) => format!("{host}_PORT{port}"),
None => host.to_string(),
};
out.push(host_port);
@@ -128,7 +127,7 @@ impl DiskCache {
None => Some(base.with_extension(extension)),
Some(ext) => {
let original_extension = OsStr::to_str(ext).unwrap();
- let final_extension = format!("{}.{}", original_extension, extension);
+ let final_extension = format!("{original_extension}.{extension}");
Some(base.with_extension(final_extension))
}
}