mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: use Rust 1.64.0 (#16035)
This commit is contained in:
parent
c7dd842f84
commit
4b01ef5c23
7 changed files with 17 additions and 22 deletions
|
@ -30,7 +30,7 @@ use tower_lsp::lsp_types::Range;
|
|||
/// fixes we treat them the same.
|
||||
static FIX_ALL_ERROR_CODES: Lazy<HashMap<&'static str, &'static str>> =
|
||||
Lazy::new(|| {
|
||||
(&[("2339", "2339"), ("2345", "2339")])
|
||||
([("2339", "2339"), ("2345", "2339")])
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
|
@ -40,7 +40,7 @@ static FIX_ALL_ERROR_CODES: Lazy<HashMap<&'static str, &'static str>> =
|
|||
/// multiple fixes available.
|
||||
static PREFERRED_FIXES: Lazy<HashMap<&'static str, (u32, bool)>> =
|
||||
Lazy::new(|| {
|
||||
(&[
|
||||
([
|
||||
("annotateWithTypeFromJSDoc", (1, false)),
|
||||
("constructorForDerivedNeedSuperCall", (1, false)),
|
||||
("extendsInterfaceBecomesImplements", (1, false)),
|
||||
|
@ -54,9 +54,9 @@ static PREFERRED_FIXES: Lazy<HashMap<&'static str, (u32, bool)>> =
|
|||
("addMissingAwait", (1, false)),
|
||||
("fixImport", (0, true)),
|
||||
])
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
});
|
||||
|
||||
static IMPORT_SPECIFIER_RE: Lazy<Regex> =
|
||||
|
|
|
@ -121,12 +121,9 @@ impl ProgressBar {
|
|||
pub fn clear(&self) {
|
||||
let mut inner = self.0.lock();
|
||||
|
||||
match inner.pb.as_ref() {
|
||||
Some(pb) => {
|
||||
pb.finish_and_clear();
|
||||
inner.pb = None;
|
||||
}
|
||||
None => {}
|
||||
};
|
||||
if let Some(pb) = inner.pb.as_ref() {
|
||||
pb.finish_and_clear();
|
||||
inner.pb = None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ pub async fn format(
|
|||
files
|
||||
.iter()
|
||||
.any(|path| paths.contains(path))
|
||||
.then(|| files)
|
||||
.then_some(files)
|
||||
.unwrap_or_else(|| [].to_vec())
|
||||
} else {
|
||||
files
|
||||
|
|
|
@ -128,7 +128,7 @@ pub async fn lint(flags: Flags, lint_flags: LintFlags) -> Result<(), AnyError> {
|
|||
files
|
||||
.iter()
|
||||
.any(|path| paths.contains(path))
|
||||
.then(|| files)
|
||||
.then_some(files)
|
||||
.unwrap_or_else(|| [].to_vec())
|
||||
} else {
|
||||
files
|
||||
|
|
|
@ -84,7 +84,7 @@ macro_rules! inc {
|
|||
/// Contains static assets that are not preloaded in the compiler snapshot.
|
||||
pub static STATIC_ASSETS: Lazy<HashMap<&'static str, &'static str>> =
|
||||
Lazy::new(|| {
|
||||
(&[
|
||||
([
|
||||
(
|
||||
"lib.dom.asynciterable.d.ts",
|
||||
inc!("lib.dom.asynciterable.d.ts"),
|
||||
|
@ -112,9 +112,9 @@ pub static STATIC_ASSETS: Lazy<HashMap<&'static str, &'static str>> =
|
|||
inc!("lib.webworker.iterable.d.ts"),
|
||||
),
|
||||
])
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect()
|
||||
});
|
||||
|
||||
/// A structure representing stats from a type check operation for a graph.
|
||||
|
|
|
@ -141,9 +141,7 @@ impl CliMainWorker {
|
|||
};
|
||||
self.pending_unload = false;
|
||||
|
||||
if let Err(err) = result {
|
||||
return Err(err);
|
||||
}
|
||||
result?;
|
||||
|
||||
self
|
||||
.inner
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.63.0"
|
||||
channel = "1.64.0"
|
||||
components = ["rustfmt", "clippy"]
|
||||
|
|
Loading…
Reference in a new issue