Skip to content

Commit 07eb601

Browse files
committed
clippy fixes for 1.88.0
1 parent 9ed7cc6 commit 07eb601

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

bzip2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ fn configError() -> ! {
972972
"\tProbably you can fix this by defining them correctly,\n",
973973
"\tand recompiling. Bye!\n",
974974
);
975-
eprint!("{}", MSG);
975+
eprint!("{MSG}");
976976
setExit(3);
977977
exit(exitValue.load(Ordering::SeqCst));
978978
}

bzip2recover.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl core::fmt::Display for EmitError<'_> {
132132
self.in_filename.display(),
133133
)?;
134134

135-
writeln!(f, "{}", io_error)?;
135+
writeln!(f, "{io_error}")?;
136136

137137
writeln!(
138138
f,
@@ -150,7 +150,7 @@ impl core::fmt::Display for EmitError<'_> {
150150
self.in_filename.display(),
151151
)?;
152152

153-
writeln!(f, "{}", io_error)?;
153+
writeln!(f, "{io_error}")?;
154154

155155
writeln!(
156156
f,
@@ -211,7 +211,7 @@ fn main_help(program_name: &Path, in_filename: &Path) -> Result<(), Error> {
211211
};
212212

213213
let mut input_bitstream = BitStream::open_read_stream(input_file);
214-
eprintln!("{}: searching for block boundaries ...", progname);
214+
eprintln!("{progname}: searching for block boundaries ...");
215215

216216
let mut bits_read: u64 = 0;
217217
let mut buff_lo: u32 = 0;
@@ -278,12 +278,12 @@ fn main_help(program_name: &Path, in_filename: &Path) -> Result<(), Error> {
278278
/*-- identified blocks run from 1 to rbCtr inclusive. --*/
279279

280280
if rb_ctr < 1 {
281-
eprintln!("{}: sorry, I couldn't find any block boundaries.", progname);
281+
eprintln!("{progname}: sorry, I couldn't find any block boundaries.");
282282

283283
return Err(Error::Fatal);
284284
}
285285

286-
eprintln!("{}: splitting into blocks", progname);
286+
eprintln!("{progname}: splitting into blocks");
287287

288288
let Ok(input_file) = std::fs::File::options().read(true).open(in_filename) else {
289289
eprintln!("{}: can't read `{}'", progname, in_filename.display());
@@ -376,7 +376,7 @@ fn main_help(program_name: &Path, in_filename: &Path) -> Result<(), Error> {
376376
}
377377
}
378378

379-
eprintln!("{}: finished", progname);
379+
eprintln!("{progname}: finished");
380380

381381
Ok(())
382382
}
@@ -409,7 +409,7 @@ fn main() -> ExitCode {
409409
error,
410410
};
411411

412-
eprint!("{}", emit_error);
412+
eprint!("{emit_error}");
413413

414414
ExitCode::FAILURE
415415
}
@@ -435,7 +435,7 @@ mod test {
435435
};
436436

437437
let mut buf = String::new();
438-
write!(&mut buf, "{}", emit_error).unwrap();
438+
write!(&mut buf, "{emit_error}").unwrap();
439439

440440
assert_eq!(
441441
buf,
@@ -470,7 +470,7 @@ mod test {
470470
};
471471

472472
let mut buf = String::new();
473-
write!(&mut buf, "{}", emit_error).unwrap();
473+
write!(&mut buf, "{emit_error}").unwrap();
474474

475475
assert_eq!(
476476
buf,
@@ -504,7 +504,7 @@ mod test {
504504
};
505505

506506
let mut buf = String::new();
507-
write!(&mut buf, "{}", emit_error).unwrap();
507+
write!(&mut buf, "{emit_error}").unwrap();
508508

509509
assert_eq!(
510510
buf,

tests/quick.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,7 @@ mod compress_command {
15701570

15711571
let output = match cmd.output() {
15721572
Ok(output) => output,
1573-
Err(err) => panic!("Running {:?} failed with {err:?}", cmd),
1573+
Err(err) => panic!("Running {cmd:?} failed with {err:?}"),
15741574
};
15751575

15761576
assert!(

0 commit comments

Comments
 (0)