mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +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 {
|
if options.raw {
|
||||||
let bytes = match options.algo_name {
|
let bytes = match options.algo_name {
|
||||||
ALGORITHM_OPTIONS_CRC => {
|
ALGORITHM_OPTIONS_CRC => sum.parse::<u32>().unwrap().to_be_bytes().to_vec(),
|
||||||
let bytes = sum.parse::<u32>().unwrap().to_be_bytes();
|
|
||||||
bytes.to_vec()
|
|
||||||
}
|
|
||||||
ALGORITHM_OPTIONS_SYSV | ALGORITHM_OPTIONS_BSD => {
|
ALGORITHM_OPTIONS_SYSV | ALGORITHM_OPTIONS_BSD => {
|
||||||
let bytes = sum.parse::<u16>().unwrap().to_be_bytes();
|
sum.parse::<u16>().unwrap().to_be_bytes().to_vec()
|
||||||
bytes.to_vec()
|
|
||||||
}
|
|
||||||
_ => {
|
|
||||||
let bytes = decode(sum).unwrap();
|
|
||||||
bytes
|
|
||||||
}
|
}
|
||||||
|
_ => decode(sum).unwrap(),
|
||||||
};
|
};
|
||||||
stdout().write_all(&bytes)?;
|
stdout().write_all(&bytes)?;
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue