mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
cksum: fixed clippy and fmt errors
This commit is contained in:
parent
911df1d76c
commit
9a76997b0a
1 changed files with 3 additions and 10 deletions
|
@ -177,18 +177,11 @@ where
|
|||
|
||||
if options.raw {
|
||||
let bytes = match options.algo_name {
|
||||
ALGORITHM_OPTIONS_CRC => {
|
||||
let bytes = sum.parse::<u32>().unwrap().to_be_bytes();
|
||||
bytes.to_vec()
|
||||
}
|
||||
ALGORITHM_OPTIONS_CRC => sum.parse::<u32>().unwrap().to_be_bytes().to_vec(),
|
||||
ALGORITHM_OPTIONS_SYSV | ALGORITHM_OPTIONS_BSD => {
|
||||
let bytes = sum.parse::<u16>().unwrap().to_be_bytes();
|
||||
bytes.to_vec()
|
||||
}
|
||||
_ => {
|
||||
let bytes = decode(sum).unwrap();
|
||||
bytes
|
||||
sum.parse::<u16>().unwrap().to_be_bytes().to_vec()
|
||||
}
|
||||
_ => decode(sum).unwrap(),
|
||||
};
|
||||
stdout().write_all(&bytes)?;
|
||||
return Ok(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue