@@ -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
@@ -541,7 +541,7 @@ impl Settings {
541541 ) ) ;
542542 }
543543
544- platform:: instantiate_current_writer ( & self . filter , filename, is_new)
544+ platform:: instantiate_current_writer ( self . filter . as_deref ( ) , filename, is_new)
545545 }
546546}
547547
@@ -607,14 +607,14 @@ fn get_input_size<R>(
607607 input : & String ,
608608 reader : & mut R ,
609609 buf : & mut Vec < u8 > ,
610- io_blksize : & Option < u64 > ,
610+ io_blksize : Option < u64 > ,
611611) -> io:: Result < u64 >
612612where
613613 R : BufRead ,
614614{
615615 // Set read limit to io_blksize if specified
616616 let read_limit: u64 = if let Some ( custom_blksize) = io_blksize {
617- * custom_blksize
617+ custom_blksize
618618 } else {
619619 // otherwise try to get it from filesystem, or use default
620620 uucore:: fs:: sane_blksize:: sane_blksize_from_path ( Path :: new ( input) )
@@ -1084,7 +1084,7 @@ where
10841084{
10851085 // Get the size of the input in bytes
10861086 let initial_buf = & mut Vec :: new ( ) ;
1087- let mut num_bytes = get_input_size ( & settings. input , reader, initial_buf, & settings. io_blksize ) ?;
1087+ let mut num_bytes = get_input_size ( & settings. input , reader, initial_buf, settings. io_blksize ) ?;
10881088 let mut reader = initial_buf. chain ( reader) ;
10891089
10901090 // If input file is empty and we would not have determined the Kth chunk
@@ -1230,7 +1230,7 @@ where
12301230 // Get the size of the input in bytes and compute the number
12311231 // of bytes per chunk.
12321232 let initial_buf = & mut Vec :: new ( ) ;
1233- let num_bytes = get_input_size ( & settings. input , reader, initial_buf, & settings. io_blksize ) ?;
1233+ let num_bytes = get_input_size ( & settings. input , reader, initial_buf, settings. io_blksize ) ?;
12341234 let reader = initial_buf. chain ( reader) ;
12351235
12361236 // If input file is empty and we would not have determined the Kth chunk
0 commit comments