File tree Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Expand file tree Collapse file tree 1 file changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ impl OutputStreamFormatter {
185
185
}
186
186
}
187
187
188
- fn format_filename ( & self , filename : & str , success : impl IntoStatus ) -> String {
189
- let status = success. into_status ( ) ;
188
+ fn format_filename ( & self , filename : & str , success : bool ) -> String {
189
+ let status = if success { Status :: Pass } else { Status :: Fail } ;
190
190
191
191
let color = match status {
192
192
Status :: Pass | Status :: Fixed => AnsiColor :: Green ,
@@ -264,31 +264,6 @@ impl OutputStreamFormatter {
264
264
}
265
265
}
266
266
267
- pub trait IntoStatus {
268
- fn into_status ( self ) -> Status ;
269
- }
270
-
271
- impl IntoStatus for bool {
272
- fn into_status ( self ) -> Status {
273
- if self {
274
- Status :: Pass
275
- } else {
276
- Status :: Fail
277
- }
278
- }
279
- }
280
-
281
- impl IntoStatus for ( Status , bool ) {
282
- fn into_status ( self ) -> Status {
283
- let ( if_ok, is_ok) = self ;
284
- if is_ok {
285
- if_ok
286
- } else {
287
- Status :: Fail
288
- }
289
- }
290
- }
291
-
292
267
#[ derive( Clone , Copy ) ]
293
268
pub enum Status {
294
269
Pass ,
You can’t perform that action at this time.
0 commit comments