diff options
-rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
-rw-r--r-- | cli/swc_util.rs | 2 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 2 | ||||
-rw-r--r-- | cli/tsc.rs | 4 |
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() }) }) } |