clippy: inline variables into format string

This commit is contained in:
ddidderr 2023-01-31 19:55:16 +01:00
parent c92e078531
commit 0d0d7bacea
Signed by: ddidderr
GPG Key ID: 3841F1C27E6F0E14

View File

@ -15,7 +15,7 @@ fn print_printable_or_dot(chunk: &[u8]) {
#[inline(always)] #[inline(always)]
fn print_offset(offset: usize) { fn print_offset(offset: usize) {
print!("{:08x} ", offset); print!("{offset:08x} ");
} }
#[inline(always)] #[inline(always)]
@ -24,7 +24,7 @@ fn print_data_hex(chunk: &[u8]) {
if idx > 0 && idx % 8 == 0 { if idx > 0 && idx % 8 == 0 {
print!(" "); print!(" ");
} }
print!("{:02x} ", byte); print!("{byte:02x} ");
} }
} }