summaryrefslogtreecommitdiff
path: root/cli/lsp/registries.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/lsp/registries.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/lsp/registries.rs')
-rw-r--r--cli/lsp/registries.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs
index ca7b6368e..d67068ec7 100644
--- a/cli/lsp/registries.rs
+++ b/cli/lsp/registries.rs
@@ -217,10 +217,10 @@ fn get_endpoint_with_match(
Token::Key(k) if k.name == *key => Some(k),
_ => None,
});
- url = url
- .replace(&format!("${{{}}}", name), &value.to_string(maybe_key, true));
+ url =
+ url.replace(&format!("${{{name}}}"), &value.to_string(maybe_key, true));
url = url.replace(
- &format!("${{{{{}}}}}", name),
+ &format!("${{{{{name}}}}}"),
&percent_encoding::percent_encode(
value.to_string(maybe_key, true).as_bytes(),
COMPONENT,
@@ -278,8 +278,8 @@ fn replace_variable(
let value = maybe_value.unwrap_or("");
if let StringOrNumber::String(name) = &variable.name {
url_str
- .replace(&format!("${{{}}}", name), value)
- .replace(&format! {"${{{{{}}}}}", name}, value)
+ .replace(&format!("${{{name}}}"), value)
+ .replace(&format! {"${{{{{name}}}}}"}, value)
} else {
url_str
}
@@ -723,7 +723,7 @@ impl ModuleRegistry {
}
for (idx, item) in items.into_iter().enumerate() {
let mut label = if let Some(p) = &prefix {
- format!("{}{}", p, item)
+ format!("{p}{item}")
} else {
item.clone()
};
@@ -880,7 +880,7 @@ impl ModuleRegistry {
is_incomplete = true;
}
for (idx, item) in items.into_iter().enumerate() {
- let path = format!("{}{}", prefix, item);
+ let path = format!("{prefix}{item}");
let kind = Some(lsp::CompletionItemKind::FOLDER);
let item_specifier = base.join(&path).ok()?;
let full_text = item_specifier.as_str();