@@ -55,7 +55,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
5555 let ( args, obs_lines) = handle_obsolete ( args) ;
5656 let matches = uu_app ( ) . try_get_matches_from ( args) ?;
5757
58- match Settings :: from ( & matches, & obs_lines) {
58+ match Settings :: from ( & matches, obs_lines. as_deref ( ) ) {
5959 Ok ( settings) => split ( & settings) ,
6060 Err ( e) if e. requires_usage ( ) => Err ( UUsageError :: new ( 1 , format ! ( "{e}" ) ) ) ,
6161 Err ( e) => Err ( USimpleError :: new ( 1 , format ! ( "{e}" ) ) ) ,
@@ -460,7 +460,7 @@ impl SettingsError {
460460
461461impl Settings {
462462 /// Parse a strategy from the command-line arguments.
463- fn from ( matches : & ArgMatches , obs_lines : & Option < String > ) -> Result < Self , SettingsError > {
463+ fn from ( matches : & ArgMatches , obs_lines : Option < & str > ) -> Result < Self , SettingsError > {
464464 let strategy = Strategy :: from ( matches, obs_lines) . map_err ( SettingsError :: Strategy ) ?;
465465 let suffix = Suffix :: from ( matches, & strategy) . map_err ( SettingsError :: Suffix ) ?;
466466
@@ -539,7 +539,7 @@ impl Settings {
539539 ) ) ;
540540 }
541541
542- platform:: instantiate_current_writer ( & self . filter , filename, is_new)
542+ platform:: instantiate_current_writer ( self . filter . as_deref ( ) , filename, is_new)
543543 }
544544}
545545
@@ -605,14 +605,14 @@ fn get_input_size<R>(
605605 input : & String ,
606606 reader : & mut R ,
607607 buf : & mut Vec < u8 > ,
608- io_blksize : & Option < u64 > ,
608+ io_blksize : Option < u64 > ,
609609) -> io:: Result < u64 >
610610where
611611 R : BufRead ,
612612{
613613 // Set read limit to io_blksize if specified
614614 let read_limit: u64 = if let Some ( custom_blksize) = io_blksize {
615- * custom_blksize
615+ custom_blksize
616616 } else {
617617 // otherwise try to get it from filesystem, or use default
618618 uucore:: fs:: sane_blksize:: sane_blksize_from_path ( Path :: new ( input) )
@@ -1082,7 +1082,7 @@ where
10821082{
10831083 // Get the size of the input in bytes
10841084 let initial_buf = & mut Vec :: new ( ) ;
1085- let mut num_bytes = get_input_size ( & settings. input , reader, initial_buf, & settings. io_blksize ) ?;
1085+ let mut num_bytes = get_input_size ( & settings. input , reader, initial_buf, settings. io_blksize ) ?;
10861086 let mut reader = initial_buf. chain ( reader) ;
10871087
10881088 // If input file is empty and we would not have determined the Kth chunk
@@ -1228,7 +1228,7 @@ where
12281228 // Get the size of the input in bytes and compute the number
12291229 // of bytes per chunk.
12301230 let initial_buf = & mut Vec :: new ( ) ;
1231- let num_bytes = get_input_size ( & settings. input , reader, initial_buf, & settings. io_blksize ) ?;
1231+ let num_bytes = get_input_size ( & settings. input , reader, initial_buf, settings. io_blksize ) ?;
12321232 let reader = initial_buf. chain ( reader) ;
12331233
12341234 // If input file is empty and we would not have determined the Kth chunk
0 commit comments