Skip to content

Commit 7ef97a0

Browse files
committed
lint: fix clippy
1 parent 7574869 commit 7ef97a0

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/_utils.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ where
150150
FsTreeBuilder {
151151
size_getter,
152152
reporter: ErrorOnlyReporter::new(|error| {
153-
panic!("Unexpected call to report_error: {:?}", error)
153+
panic!("Unexpected call to report_error: {error:?}")
154154
}),
155155
root: root.join(suffix),
156156
}
@@ -293,9 +293,9 @@ impl<'a> CommandList<'a> {
293293
/// Make sure a flag name has valid syntax.
294294
fn assert_flag(name: &str) {
295295
match name.len() {
296-
0 | 1 => panic!("{:?} is not a valid flag", name),
297-
2 => assert!(name.starts_with('-'), "{:?} is not a valid flag", name),
298-
_ => assert!(name.starts_with("--"), "{:?} is not a valid flag", name),
296+
0 | 1 => panic!("{name:?} is not a valid flag"),
297+
2 => assert!(name.starts_with('-'), "{name:?} is not a valid flag"),
298+
_ => assert!(name.starts_with("--"), "{name:?} is not a valid flag"),
299299
}
300300
}
301301
}
@@ -312,8 +312,7 @@ pub fn stdout_text(
312312
inspect_stderr(&stderr);
313313
assert!(
314314
status.success(),
315-
"progress exits with non-zero status: {:?}",
316-
status
315+
"progress exits with non-zero status: {status:?}",
317316
);
318317
stdout
319318
.pipe(String::from_utf8)

tests/cli_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn fs_permission(path: impl AsRef<Path>, permission: &'static str, recursive: bo
4343
.output()
4444
.expect("run chmod command");
4545
inspect_stderr(&stderr);
46-
assert!(status.success(), "chmod fails {:?}", status);
46+
assert!(status.success(), "chmod fails {status:?}");
4747
}
4848

4949
#[test]

0 commit comments

Comments
 (0)