File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl<T: Write> PrettyFormatter<T> {
169
169
170
170
fn write_test_name ( & mut self , desc : & TestDesc ) -> io:: Result < ( ) > {
171
171
let name = desc. padded_name ( self . max_name_len , desc. name . padding ( ) ) ;
172
- self . write_plain ( & format ! ( "test {} {} ... " , name, desc. test_mode_string( ) ) ) ?;
172
+ self . write_plain ( & format ! ( "test {} - {} ... " , name, desc. test_mode_string( ) ) ) ?;
173
173
174
174
Ok ( ( ) )
175
175
}
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ impl<T: Write> TerseFormatter<T> {
158
158
159
159
fn write_test_name ( & mut self , desc : & TestDesc ) -> io:: Result < ( ) > {
160
160
let name = desc. padded_name ( self . max_name_len , desc. name . padding ( ) ) ;
161
- self . write_plain ( & format ! ( "test {} {} ... " , name, desc. test_mode_string( ) ) ) ?;
161
+ self . write_plain ( & format ! ( "test {} - {} ... " , name, desc. test_mode_string( ) ) ) ?;
162
162
163
163
Ok ( ( ) )
164
164
}
Original file line number Diff line number Diff line change @@ -143,26 +143,26 @@ impl TestDesc {
143
143
}
144
144
}
145
145
146
- pub fn test_mode_string ( & self ) -> String {
146
+ pub fn test_mode_string ( & self ) -> & ' static str {
147
147
if self . ignore {
148
- return "ignore" . to_string ( ) ;
148
+ return & "ignore" ;
149
149
}
150
150
match self . should_panic {
151
151
options:: ShouldPanic :: Yes | options:: ShouldPanic :: YesWithMessage ( _) => {
152
- return "should panic" . to_string ( ) ;
152
+ return & "should panic" ;
153
153
}
154
- _ => { }
154
+ options :: ShouldPanic :: No => { }
155
155
}
156
156
if self . allow_fail {
157
- return "allow fail" . to_string ( ) ;
157
+ return & "allow fail" ;
158
158
}
159
159
if self . compile_fail {
160
- return "compile fail" . to_string ( ) ;
160
+ return & "compile fail" ;
161
161
}
162
162
if self . no_run {
163
- return "compile" . to_string ( ) ;
163
+ return & "compile" ;
164
164
}
165
- "run" . to_string ( )
165
+ & "run"
166
166
}
167
167
}
168
168
You can’t perform that action at this time.
0 commit comments