summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/versioncheck.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/versioncheck.rs')
-rw-r--r--src/tools/clippy/tests/versioncheck.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/clippy/tests/versioncheck.rs b/src/tools/clippy/tests/versioncheck.rs
index 38498ebdc..a6d8d0307 100644
--- a/src/tools/clippy/tests/versioncheck.rs
+++ b/src/tools/clippy/tests/versioncheck.rs
@@ -8,12 +8,12 @@ use std::fs;
#[test]
fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy() {
fn read_version(path: &str) -> String {
- let contents = fs::read_to_string(path).unwrap_or_else(|e| panic!("error reading `{}`: {:?}", path, e));
+ let contents = fs::read_to_string(path).unwrap_or_else(|e| panic!("error reading `{path}`: {e:?}"));
contents
.lines()
.filter_map(|l| l.split_once('='))
.find_map(|(k, v)| (k.trim() == "version").then(|| v.trim()))
- .unwrap_or_else(|| panic!("error finding version in `{}`", path))
+ .unwrap_or_else(|| panic!("error finding version in `{path}`"))
.to_string()
}
@@ -48,7 +48,7 @@ fn check_that_clippy_has_the_same_major_version_as_rustc() {
// `RUSTC_REAL` if Clippy is build in the Rust repo with `./x.py`.
let rustc = std::env::var("RUSTC_REAL").unwrap_or_else(|_| "rustc".to_string());
let rustc_version = String::from_utf8(
- std::process::Command::new(&rustc)
+ std::process::Command::new(rustc)
.arg("--version")
.output()
.expect("failed to run `rustc --version`")
@@ -83,7 +83,7 @@ fn check_that_clippy_has_the_same_major_version_as_rustc() {
// we don't want our tests failing suddenly
},
_ => {
- panic!("Failed to parse rustc version: {:?}", vsplit);
+ panic!("Failed to parse rustc version: {vsplit:?}");
},
};
}