@@ -464,7 +464,8 @@ impl Entry {
464464 }
465465}
466466
467- // Used for padding in long format
467+ /// Used for padding in long format
468+ #[ derive( Default ) ]
468469pub struct LongFormatPadding {
469470 pub blocks_str_width : usize ,
470471 pub inode_str_width : usize ,
@@ -477,22 +478,6 @@ pub struct LongFormatPadding {
477478 pub time_width : usize ,
478479}
479480
480- impl Default for LongFormatPadding {
481- fn default ( ) -> Self {
482- Self {
483- blocks_str_width : 0 ,
484- inode_str_width : 0 ,
485- num_links_width : 0 ,
486- owner_name_width : 0 ,
487- group_name_width : 0 ,
488- file_size_width : 0 ,
489- device_id_major_width : 0 ,
490- device_id_minor_width : 0 ,
491- time_width : 0 ,
492- }
493- }
494- }
495-
496481impl LongFormatPadding {
497482 /// Get the maximum padding for each field.
498483 pub fn update_maximum ( & mut self , other : & LongFormatPadding ) {
@@ -525,25 +510,15 @@ impl LongFormatPadding {
525510 }
526511}
527512
528- // Used for padding in multi-column format
513+ /// Used for padding in multi-column format
514+ #[ derive( Default ) ]
529515pub struct MultiColumnPadding {
530516 pub total_width : usize ,
531517 pub inode_str_width : usize ,
532518 pub blocks_str_width : usize ,
533519 pub file_name_width : usize ,
534520}
535521
536- impl Default for MultiColumnPadding {
537- fn default ( ) -> Self {
538- Self {
539- total_width : 0 ,
540- inode_str_width : 0 ,
541- blocks_str_width : 0 ,
542- file_name_width : 0 ,
543- }
544- }
545- }
546-
547522impl MultiColumnPadding {
548523 pub fn update_maximum ( & mut self , other : & MultiColumnPadding ) {
549524 self . total_width = usize:: max ( self . total_width , other. total_width ) ;
0 commit comments