mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
cksum: fix formatting in cksum.rs
This commit is contained in:
parent
09ef150085
commit
7caa0bcdea
1 changed files with 8 additions and 9 deletions
|
@ -250,7 +250,6 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
|
|
||||||
let input_length = matches.get_one::<usize>(options::LENGTH);
|
let input_length = matches.get_one::<usize>(options::LENGTH);
|
||||||
let length = if let Some(length) = input_length {
|
let length = if let Some(length) = input_length {
|
||||||
|
|
||||||
if length % 8 != 0 {
|
if length % 8 != 0 {
|
||||||
// GNU's implementation seem to use these quotation marks
|
// GNU's implementation seem to use these quotation marks
|
||||||
// in their error messages, so we do the same.
|
// in their error messages, so we do the same.
|
||||||
|
@ -260,15 +259,15 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
"length is not a multiple of 8",
|
"length is not a multiple of 8",
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
if algo_name != ALGORITHM_OPTIONS_BLAKE2B {
|
if algo_name != ALGORITHM_OPTIONS_BLAKE2B {
|
||||||
return Err(io::Error::new(
|
return Err(io::Error::new(
|
||||||
io::ErrorKind::InvalidInput,
|
io::ErrorKind::InvalidInput,
|
||||||
"--length is only supported with --algorithm=blake2b",
|
"--length is only supported with --algorithm=blake2b",
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Divide by 8, as our blake2b implementation expects bytes
|
// Divide by 8, as our blake2b implementation expects bytes
|
||||||
// instead of bits.
|
// instead of bits.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue