@@ -11,15 +11,15 @@ use std::num::ParseIntError;
1111use std:: path:: Path ;
1212
1313use clap:: builder:: ValueParser ;
14- use clap:: { Arg , ArgAction , ArgMatches , Command , value_parser } ;
14+ use clap:: { Arg , ArgAction , ArgMatches , Command } ;
1515
1616use uucore:: checksum:: compute:: {
1717 ChecksumComputeOptions , figure_out_output_format, perform_checksum_computation,
1818} ;
1919use uucore:: checksum:: validate:: {
2020 ChecksumValidateOptions , ChecksumVerbose , perform_checksum_validation,
2121} ;
22- use uucore:: checksum:: { AlgoKind , ChecksumError , SizedAlgoKind , calculate_blake2b_length } ;
22+ use uucore:: checksum:: { AlgoKind , ChecksumError , SizedAlgoKind , calculate_blake2b_length_str } ;
2323use uucore:: error:: UResult ;
2424use uucore:: line_ending:: LineEnding ;
2525use uucore:: { format_usage, translate} ;
@@ -139,14 +139,14 @@ pub fn uumain(mut args: impl uucore::Args) -> UResult<()> {
139139 // least somewhat better from a user's perspective.
140140 let matches = uucore:: clap_localization:: handle_clap_result ( command, args) ?;
141141
142- let input_length: Option < & usize > = if binary_name == "b2sum" {
143- matches. get_one :: < usize > ( options:: LENGTH )
142+ let input_length: Option < & String > = if binary_name == "b2sum" {
143+ matches. get_one :: < String > ( options:: LENGTH )
144144 } else {
145145 None
146146 } ;
147147
148148 let length = match input_length {
149- Some ( length) => calculate_blake2b_length ( * length) ?,
149+ Some ( length) => calculate_blake2b_length_str ( length) ?,
150150 None => None ,
151151 } ;
152152
@@ -378,7 +378,6 @@ fn uu_app_opt_length(command: Command) -> Command {
378378 command. arg (
379379 Arg :: new ( options:: LENGTH )
380380 . long ( options:: LENGTH )
381- . value_parser ( value_parser ! ( usize ) )
382381 . short ( 'l' )
383382 . help ( translate ! ( "hashsum-help-length" ) )
384383 . overrides_with ( options:: LENGTH )
0 commit comments