mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 06:42:42 +00:00
Fix clippy::format_collect.
This commit is contained in:
parent
3c26dd869e
commit
ae01996066
1 changed files with 5 additions and 4 deletions
|
@ -23,6 +23,7 @@ use crate::{
|
|||
},
|
||||
util_name,
|
||||
};
|
||||
use std::fmt::Write;
|
||||
use std::io::stdin;
|
||||
use std::io::BufRead;
|
||||
use thiserror::Error;
|
||||
|
@ -321,10 +322,10 @@ fn determine_regex(lines: &[String]) -> Option<(Regex, bool)> {
|
|||
|
||||
// Converts bytes to a hexadecimal string
|
||||
fn bytes_to_hex(bytes: &[u8]) -> String {
|
||||
bytes
|
||||
.iter()
|
||||
.map(|byte| format!("{byte:02x}"))
|
||||
.collect::<String>()
|
||||
bytes.iter().fold(String::new(), |mut bytes, byte| {
|
||||
write!(bytes, "{byte:02x}").unwrap();
|
||||
bytes
|
||||
})
|
||||
}
|
||||
|
||||
fn get_expected_checksum(
|
||||
|
|
Loading…
Reference in a new issue