0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-07 23:06:50 -05:00

chore: use Rust 1.64.0 (#16035)

This commit is contained in:
Mathias Lafeldt 2022-09-26 21:52:16 +02:00 committed by GitHub
parent c7dd842f84
commit 4b01ef5c23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 22 deletions

View file

@ -30,7 +30,7 @@ use tower_lsp::lsp_types::Range;
/// fixes we treat them the same. /// fixes we treat them the same.
static FIX_ALL_ERROR_CODES: Lazy<HashMap<&'static str, &'static str>> = static FIX_ALL_ERROR_CODES: Lazy<HashMap<&'static str, &'static str>> =
Lazy::new(|| { Lazy::new(|| {
(&[("2339", "2339"), ("2345", "2339")]) ([("2339", "2339"), ("2345", "2339")])
.iter() .iter()
.cloned() .cloned()
.collect() .collect()
@ -40,7 +40,7 @@ static FIX_ALL_ERROR_CODES: Lazy<HashMap<&'static str, &'static str>> =
/// multiple fixes available. /// multiple fixes available.
static PREFERRED_FIXES: Lazy<HashMap<&'static str, (u32, bool)>> = static PREFERRED_FIXES: Lazy<HashMap<&'static str, (u32, bool)>> =
Lazy::new(|| { Lazy::new(|| {
(&[ ([
("annotateWithTypeFromJSDoc", (1, false)), ("annotateWithTypeFromJSDoc", (1, false)),
("constructorForDerivedNeedSuperCall", (1, false)), ("constructorForDerivedNeedSuperCall", (1, false)),
("extendsInterfaceBecomesImplements", (1, false)), ("extendsInterfaceBecomesImplements", (1, false)),
@ -54,9 +54,9 @@ static PREFERRED_FIXES: Lazy<HashMap<&'static str, (u32, bool)>> =
("addMissingAwait", (1, false)), ("addMissingAwait", (1, false)),
("fixImport", (0, true)), ("fixImport", (0, true)),
]) ])
.iter() .iter()
.cloned() .cloned()
.collect() .collect()
}); });
static IMPORT_SPECIFIER_RE: Lazy<Regex> = static IMPORT_SPECIFIER_RE: Lazy<Regex> =

View file

@ -121,12 +121,9 @@ impl ProgressBar {
pub fn clear(&self) { pub fn clear(&self) {
let mut inner = self.0.lock(); let mut inner = self.0.lock();
match inner.pb.as_ref() { if let Some(pb) = inner.pb.as_ref() {
Some(pb) => { pb.finish_and_clear();
pb.finish_and_clear(); inner.pb = None;
inner.pb = None; }
}
None => {}
};
} }
} }

View file

@ -108,7 +108,7 @@ pub async fn format(
files files
.iter() .iter()
.any(|path| paths.contains(path)) .any(|path| paths.contains(path))
.then(|| files) .then_some(files)
.unwrap_or_else(|| [].to_vec()) .unwrap_or_else(|| [].to_vec())
} else { } else {
files files

View file

@ -128,7 +128,7 @@ pub async fn lint(flags: Flags, lint_flags: LintFlags) -> Result<(), AnyError> {
files files
.iter() .iter()
.any(|path| paths.contains(path)) .any(|path| paths.contains(path))
.then(|| files) .then_some(files)
.unwrap_or_else(|| [].to_vec()) .unwrap_or_else(|| [].to_vec())
} else { } else {
files files

View file

@ -84,7 +84,7 @@ macro_rules! inc {
/// Contains static assets that are not preloaded in the compiler snapshot. /// Contains static assets that are not preloaded in the compiler snapshot.
pub static STATIC_ASSETS: Lazy<HashMap<&'static str, &'static str>> = pub static STATIC_ASSETS: Lazy<HashMap<&'static str, &'static str>> =
Lazy::new(|| { Lazy::new(|| {
(&[ ([
( (
"lib.dom.asynciterable.d.ts", "lib.dom.asynciterable.d.ts",
inc!("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"), inc!("lib.webworker.iterable.d.ts"),
), ),
]) ])
.iter() .iter()
.cloned() .cloned()
.collect() .collect()
}); });
/// A structure representing stats from a type check operation for a graph. /// A structure representing stats from a type check operation for a graph.

View file

@ -141,9 +141,7 @@ impl CliMainWorker {
}; };
self.pending_unload = false; self.pending_unload = false;
if let Err(err) = result { result?;
return Err(err);
}
self self
.inner .inner

View file

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "1.63.0" channel = "1.64.0"
components = ["rustfmt", "clippy"] components = ["rustfmt", "clippy"]