summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-06-05 04:23:07 +0200
committerBert Belder <bertbelder@gmail.com>2020-06-05 05:11:15 +0200
commit9a783ae4e6789fc90c8a6d62e846c9abd29e7d2f (patch)
treef29deee9518be75fc4b4d99e4e3c24343de83053
parent7069d60423979858ece856d52ef9567a50f8ef76 (diff)
ci: upgrade to Rust 1.44.0 (#6113)
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--cli/swc_util.rs2
-rw-r--r--cli/tests/integration_tests.rs2
-rw-r--r--cli/tsc.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8d6cab782..532a7c1e7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -66,7 +66,7 @@ jobs:
- name: Install rust
uses: hecrj/setup-rust-action@v1
with:
- rust-version: "1.43.0"
+ rust-version: 1.44.0
- name: Install clippy and rustfmt
if: matrix.config.kind == 'lint'
diff --git a/cli/swc_util.rs b/cli/swc_util.rs
index 0d1d1ba08..0d75877bf 100644
--- a/cli/swc_util.rs
+++ b/cli/swc_util.rs
@@ -521,7 +521,7 @@ pub fn analyze_dependencies_and_references(
let comments = parser
.comments
.take_leading_comments(module_span.lo())
- .unwrap_or_else(|| vec![]);
+ .unwrap_or_else(Vec::new);
let mut references = vec![];
for comment in comments {
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index ff94d2f50..54d88b874 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2787,7 +2787,7 @@ mod util {
pub const PERMISSION_DENIED_PATTERN: &str = "PermissionDenied";
lazy_static! {
- static ref DENO_DIR: TempDir = { TempDir::new().expect("tempdir fail") };
+ static ref DENO_DIR: TempDir = TempDir::new().expect("tempdir fail");
// STRIP_ANSI_RE and strip_ansi_codes are lifted from the "console" crate.
// Copyright 2017 Armin Ronacher <armin.ronacher@active-4.com>. MIT License.
diff --git a/cli/tsc.rs b/cli/tsc.rs
index 2eb8a35a0..1b3208e75 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -833,12 +833,12 @@ impl SourceMapGetter for TsCompiler {
self
.try_resolve_and_get_source_file(script_name)
.and_then(|out| {
- str::from_utf8(&out.source_code).ok().and_then(|v| {
+ str::from_utf8(&out.source_code).ok().map(|v| {
// Do NOT use .lines(): it skips the terminating empty line.
// (due to internally using .split_terminator() instead of .split())
let lines: Vec<&str> = v.split('\n').collect();
assert!(lines.len() > line);
- Some(lines[line].to_string())
+ lines[line].to_string()
})
})
}