Skip to content

Commit

Permalink
ci: upgrade to Rust 1.44.0 (denoland#6113)
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Jun 5, 2020
1 parent 7069d60 commit 9a783ae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion cli/swc_util.rs
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/integration_tests.rs
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions cli/tsc.rs
Expand Up @@ -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()
})
})
}
Expand Down

0 comments on commit 9a783ae

Please sign in to comment.