From 7caa0bcdea3dcee68d954c19f4a4961a61843571 Mon Sep 17 00:00:00 2001 From: Vardhan Patil Date: Sat, 30 Dec 2023 16:02:10 +0530 Subject: [PATCH] cksum: fix formatting in cksum.rs --- src/uu/cksum/src/cksum.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/uu/cksum/src/cksum.rs b/src/uu/cksum/src/cksum.rs index ed9f3573f..2a4b539f9 100644 --- a/src/uu/cksum/src/cksum.rs +++ b/src/uu/cksum/src/cksum.rs @@ -250,7 +250,6 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { let input_length = matches.get_one::(options::LENGTH); let length = if let Some(length) = input_length { - if length % 8 != 0 { // GNU's implementation seem to use these quotation marks // 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", ) .into()); - } + } - if algo_name != ALGORITHM_OPTIONS_BLAKE2B { - return Err(io::Error::new( - io::ErrorKind::InvalidInput, - "--length is only supported with --algorithm=blake2b", - ) - .into()); - } + if algo_name != ALGORITHM_OPTIONS_BLAKE2B { + return Err(io::Error::new( + io::ErrorKind::InvalidInput, + "--length is only supported with --algorithm=blake2b", + ) + .into()); + } // Divide by 8, as our blake2b implementation expects bytes // instead of bits.