File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -122,21 +122,16 @@ impl fmt::Display for TestName {
122
122
#[ derive( Clone , Copy ) ]
123
123
enum NamePadding {
124
124
PadNone ,
125
- PadOnLeft ,
126
125
PadOnRight ,
127
126
}
128
127
129
128
impl TestDesc {
130
129
fn padded_name ( & self , column_count : usize , align : NamePadding ) -> String {
131
130
let mut name = String :: from_str ( self . name . as_slice ( ) ) ;
132
131
let fill = column_count. saturating_sub ( name. len ( ) ) ;
133
- let mut pad = repeat ( " " ) . take ( fill) . collect :: < String > ( ) ;
132
+ let pad = repeat ( " " ) . take ( fill) . collect :: < String > ( ) ;
134
133
match align {
135
134
PadNone => name,
136
- PadOnLeft => {
137
- pad. push_str ( & name) ;
138
- pad
139
- }
140
135
PadOnRight => {
141
136
name. push_str ( & pad) ;
142
137
name
@@ -690,7 +685,7 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn> ) -> io::Res
690
685
fn len_if_padded ( t : & TestDescAndFn ) -> usize {
691
686
match t. testfn . padding ( ) {
692
687
PadNone => 0 ,
693
- PadOnLeft | PadOnRight => t. desc . name . as_slice ( ) . len ( ) ,
688
+ PadOnRight => t. desc . name . as_slice ( ) . len ( ) ,
694
689
}
695
690
}
696
691
match tests. iter ( ) . max_by ( |t|len_if_padded ( * t) ) {
You can’t perform that action at this time.
0 commit comments