diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-01-27 10:43:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 10:43:16 -0500 |
commit | f5840bdcd360ec0bac2501f333e58e25742b1537 (patch) | |
tree | 7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/lsp/analysis.rs | |
parent | 1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff) |
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/lsp/analysis.rs')
-rw-r--r-- | cli/lsp/analysis.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index c7f5ba8aa..182ad940e 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -158,7 +158,7 @@ fn check_specifier( documents: &Documents, ) -> Option<String> { for ext in SUPPORTED_EXTENSIONS { - let specifier_with_ext = format!("{}{}", specifier, ext); + let specifier_with_ext = format!("{specifier}{ext}"); if documents.contains_import(&specifier_with_ext, referrer) { return Some(specifier_with_ext); } @@ -398,7 +398,7 @@ impl CodeActionCollection { specifier.clone(), vec![lsp::TextEdit { new_text: prepend_whitespace( - format!("// deno-lint-ignore {}\n", code), + format!("// deno-lint-ignore {code}\n"), line_content, ), range: lsp::Range { @@ -414,7 +414,7 @@ impl CodeActionCollection { }], ); let ignore_error_action = lsp::CodeAction { - title: format!("Disable {} for this line", code), + title: format!("Disable {code} for this line"), kind: Some(lsp::CodeActionKind::QUICKFIX), diagnostics: Some(vec![diagnostic.clone()]), command: None, @@ -447,7 +447,7 @@ impl CodeActionCollection { }) }); - let mut new_text = format!("// deno-lint-ignore-file {}\n", code); + let mut new_text = format!("// deno-lint-ignore-file {code}\n"); let mut range = lsp::Range { start: lsp::Position { line: 0, @@ -461,7 +461,7 @@ impl CodeActionCollection { // If ignore file comment already exists, append the lint code // to the existing comment. if let Some(ignore_comment) = maybe_ignore_comment { - new_text = format!(" {}", code); + new_text = format!(" {code}"); // Get the end position of the comment. let line = maybe_parsed_source .unwrap() @@ -479,7 +479,7 @@ impl CodeActionCollection { let mut changes = HashMap::new(); changes.insert(specifier.clone(), vec![lsp::TextEdit { new_text, range }]); let ignore_file_action = lsp::CodeAction { - title: format!("Disable {} for the entire file", code), + title: format!("Disable {code} for the entire file"), kind: Some(lsp::CodeActionKind::QUICKFIX), diagnostics: Some(vec![diagnostic.clone()]), command: None, |