Skip to content

Commit

Permalink
Auto merge of #9148 - bjorn3:fix_ci, r=ehuss
Browse files Browse the repository at this point in the history
Fix warnings of the new non_fmt_panic lint

This fixes the CI failure since the latest nightly. See rust-lang/rust#81645
  • Loading branch information
bors committed Feb 6, 2021
2 parents 90b6fa8 + f5a3d55 commit 56e0df6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/cargo-test-support/src/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ rustup does not appear to be installed. Make sure that the appropriate
},
}

panic!(message);
panic!("{}", message);
}

/// The alternate target-triple to build with.
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,5 +365,5 @@ fn closed_output_ok() {
.unwrap();
let status = child.wait().unwrap();
assert!(status.success());
assert!(s.is_empty(), s);
assert!(s.is_empty(), "{}", s);
}
14 changes: 11 additions & 3 deletions tests/testsuite/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,11 @@ fn finds_git_author() {

let toml = paths::root().join("foo/Cargo.toml");
let contents = fs::read_to_string(&toml).unwrap();
assert!(contents.contains(r#"authors = ["foo <gitfoo>"]"#), contents);
assert!(
contents.contains(r#"authors = ["foo <gitfoo>"]"#),
"{}",
contents
);
}

#[cargo_test]
Expand Down Expand Up @@ -411,7 +415,11 @@ fn finds_git_author_in_included_config() {
cargo_process("new foo/bar").run();
let toml = paths::root().join("foo/bar/Cargo.toml");
let contents = fs::read_to_string(&toml).unwrap();
assert!(contents.contains(r#"authors = ["foo <bar>"]"#), contents,);
assert!(
contents.contains(r#"authors = ["foo <bar>"]"#),
"{}",
contents
);
}

#[cargo_test]
Expand Down Expand Up @@ -632,7 +640,7 @@ fn new_with_blank_email() {
.run();

let contents = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap();
assert!(contents.contains(r#"authors = ["Sen"]"#), contents);
assert!(contents.contains(r#"authors = ["Sen"]"#), "{}", contents);
}

#[cargo_test]
Expand Down

0 comments on commit 56e0df6

Please sign in to comment.