mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
refactor(cli): fewer clones (#17450)
This commit is contained in:
parent
40527526e5
commit
e023a6e3f0
6 changed files with 21 additions and 36 deletions
|
@ -29,12 +29,7 @@ use tower_lsp::lsp_types::Range;
|
|||
/// Diagnostic error codes which actually are the same, and so when grouping
|
||||
/// fixes we treat them the same.
|
||||
static FIX_ALL_ERROR_CODES: Lazy<HashMap<&'static str, &'static str>> =
|
||||
Lazy::new(|| {
|
||||
([("2339", "2339"), ("2345", "2339")])
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
});
|
||||
Lazy::new(|| ([("2339", "2339"), ("2345", "2339")]).into_iter().collect());
|
||||
|
||||
/// Fixes which help determine if there is a preferred fix when there are
|
||||
/// multiple fixes available.
|
||||
|
@ -54,8 +49,7 @@ static PREFERRED_FIXES: Lazy<HashMap<&'static str, (u32, bool)>> =
|
|||
("addMissingAwait", (1, false)),
|
||||
("fixImport", (0, true)),
|
||||
])
|
||||
.iter()
|
||||
.cloned()
|
||||
.into_iter()
|
||||
.collect()
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue