@@ -296,9 +296,9 @@ struct LongFormatOptions {
296
296
enum OutputFormat {
297
297
MultiColumn ,
298
298
MultiColumnAcross ,
299
- StreamOutputFormat ,
299
+ Stream ,
300
300
OneEntryPerLine ,
301
- LongFormat ( LongFormatOptions ) ,
301
+ Long ( LongFormatOptions ) ,
302
302
}
303
303
304
304
enum SortBy {
@@ -320,6 +320,7 @@ enum DereferenceSymbolicLink {
320
320
None ,
321
321
}
322
322
323
+ #[ allow( clippy:: enum_variant_names) ]
323
324
enum FileTimeOption {
324
325
LastModificationTime ,
325
326
LastStatusChangeTime ,
@@ -451,7 +452,7 @@ impl Config {
451
452
) {
452
453
( false , false , false , false ) => {
453
454
if long_format_enabled {
454
- OutputFormat :: LongFormat ( long_format_options)
455
+ OutputFormat :: Long ( long_format_options)
455
456
} else {
456
457
// According to the specification:
457
458
//
@@ -464,7 +465,7 @@ impl Config {
464
465
}
465
466
}
466
467
( true , false , false , false ) => OutputFormat :: MultiColumn ,
467
- ( false , true , false , false ) => OutputFormat :: StreamOutputFormat ,
468
+ ( false , true , false , false ) => OutputFormat :: Stream ,
468
469
( false , false , true , false ) => OutputFormat :: MultiColumnAcross ,
469
470
( false , false , false , true ) => OutputFormat :: OneEntryPerLine ,
470
471
_ => unreachable ! ( ) , // -C, -m, -x, and -1 are mutually exclusive
@@ -718,7 +719,7 @@ fn display_entries(entries: &mut [Entry], config: &Config, dir_path: Option<&str
718
719
}
719
720
720
721
let mut display_total_size = config. display_size ;
721
- if let OutputFormat :: LongFormat ( _) = & config. output_format {
722
+ if let OutputFormat :: Long ( _) = & config. output_format {
722
723
display_total_size = true ;
723
724
}
724
725
@@ -743,7 +744,7 @@ fn display_entries(entries: &mut [Entry], config: &Config, dir_path: Option<&str
743
744
}
744
745
745
746
match & config. output_format {
746
- OutputFormat :: LongFormat ( _) => {
747
+ OutputFormat :: Long ( _) => {
747
748
let mut padding = LongFormatPadding :: default ( ) ;
748
749
749
750
// Calculate required padding
@@ -829,7 +830,7 @@ fn display_entries(entries: &mut [Entry], config: &Config, dir_path: Option<&str
829
830
println ! ( ) ;
830
831
}
831
832
}
832
- OutputFormat :: StreamOutputFormat => {
833
+ OutputFormat :: Stream => {
833
834
let stream_outputs: Vec < _ > = entries
834
835
. iter ( )
835
836
. map ( |entry| entry. build_stream_mode_string ( ) )
@@ -962,7 +963,7 @@ fn ls(paths: Vec<PathBuf>, config: &Config) -> io::Result<u8> {
962
963
let target_path = {
963
964
let mut target_path = None ;
964
965
if metadata. is_symlink ( ) && !dereference_symlink {
965
- if let OutputFormat :: LongFormat ( _) = & config. output_format {
966
+ if let OutputFormat :: Long ( _) = & config. output_format {
966
967
let mut buf = vec ! [ 0u8 ; libc:: PATH_MAX as usize ] ;
967
968
968
969
let path_cstr = CString :: new ( path. as_os_str ( ) . as_bytes ( ) ) . unwrap ( ) ;
@@ -1174,7 +1175,7 @@ fn process_single_dir(
1174
1175
1175
1176
let mut target_path = None ;
1176
1177
if metadata. is_symlink ( ) && !dereference_symlink {
1177
- if let OutputFormat :: LongFormat ( _) = & config. output_format {
1178
+ if let OutputFormat :: Long ( _) = & config. output_format {
1178
1179
target_path = Some ( ls_from_utf8_lossy (
1179
1180
dir_entry. read_link ( ) . unwrap ( ) . to_bytes ( ) ,
1180
1181
) ) ;
0 commit comments