Skip to content

Commit

Permalink
chore: use Rust 1.64.0 (denoland#16035)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlafeldt committed Sep 26, 2022
1 parent c7dd842 commit 4b01ef5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
10 changes: 5 additions & 5 deletions cli/lsp/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)),
Expand All @@ -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> =
Expand Down
11 changes: 4 additions & 7 deletions cli/progress_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
2 changes: 1 addition & 1 deletion cli/tools/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cli/tools/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cli/tsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions cli/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ impl CliMainWorker {
};
self.pending_unload = false;

if let Err(err) = result {
return Err(err);
}
result?;

self
.inner
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.63.0"
channel = "1.64.0"
components = ["rustfmt", "clippy"]

0 comments on commit 4b01ef5

Please sign in to comment.