summaryrefslogtreecommitdiff
path: root/cli/tools/vendor
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/tools/vendor
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tools/vendor')
-rw-r--r--cli/tools/vendor/build.rs10
-rw-r--r--cli/tools/vendor/import_map.rs2
-rw-r--r--cli/tools/vendor/mappings.rs6
-rw-r--r--cli/tools/vendor/specifiers.rs2
4 files changed, 7 insertions, 13 deletions
diff --git a/cli/tools/vendor/build.rs b/cli/tools/vendor/build.rs
index 830cb39f7..f418670b3 100644
--- a/cli/tools/vendor/build.rs
+++ b/cli/tools/vendor/build.rs
@@ -204,19 +204,15 @@ fn build_proxy_module_source(
// for simplicity, always include the `export *` statement as it won't error
// even when the module does not contain a named export
- writeln!(text, "export * from \"{}\";", relative_specifier).unwrap();
+ writeln!(text, "export * from \"{relative_specifier}\";").unwrap();
// add a default export if one exists in the module
if let Some(parsed_source) =
parsed_source_cache.get_parsed_source_from_module(module)?
{
if has_default_export(&parsed_source) {
- writeln!(
- text,
- "export {{ default }} from \"{}\";",
- relative_specifier
- )
- .unwrap();
+ writeln!(text, "export {{ default }} from \"{relative_specifier}\";")
+ .unwrap();
}
}
diff --git a/cli/tools/vendor/import_map.rs b/cli/tools/vendor/import_map.rs
index 411a2e059..0897cbcf6 100644
--- a/cli/tools/vendor/import_map.rs
+++ b/cli/tools/vendor/import_map.rs
@@ -322,7 +322,7 @@ fn handle_remote_dep_specifier(
if is_remote_specifier_text(text) {
let base_specifier = mappings.base_specifier(specifier);
if !text.starts_with(base_specifier.as_str()) {
- panic!("Expected {} to start with {}", text, base_specifier);
+ panic!("Expected {text} to start with {base_specifier}");
}
let sub_path = &text[base_specifier.as_str().len()..];
diff --git a/cli/tools/vendor/mappings.rs b/cli/tools/vendor/mappings.rs
index 14705e51e..8cf6388d2 100644
--- a/cli/tools/vendor/mappings.rs
+++ b/cli/tools/vendor/mappings.rs
@@ -133,9 +133,7 @@ impl Mappings {
self
.mappings
.get(specifier)
- .unwrap_or_else(|| {
- panic!("Could not find local path for {}", specifier)
- })
+ .unwrap_or_else(|| panic!("Could not find local path for {specifier}"))
.to_path_buf()
}
}
@@ -163,7 +161,7 @@ impl Mappings {
.iter()
.find(|s| child_specifier.as_str().starts_with(s.as_str()))
.unwrap_or_else(|| {
- panic!("Could not find base specifier for {}", child_specifier)
+ panic!("Could not find base specifier for {child_specifier}")
})
}
diff --git a/cli/tools/vendor/specifiers.rs b/cli/tools/vendor/specifiers.rs
index d4f413c31..7418bcb8b 100644
--- a/cli/tools/vendor/specifiers.rs
+++ b/cli/tools/vendor/specifiers.rs
@@ -45,7 +45,7 @@ pub fn get_unique_path(
let mut count = 2;
// case insensitive comparison so the output works on case insensitive file systems
while !unique_set.insert(path.to_string_lossy().to_lowercase()) {
- path = path_with_stem_suffix(&original_path, &format!("_{}", count));
+ path = path_with_stem_suffix(&original_path, &format!("_{count}"));
count += 1;
}
path