File tree 1 file changed +7
-12
lines changed
1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -100,18 +100,13 @@ impl<'a> Renderer<'a> {
100
100
break ;
101
101
}
102
102
103
- let trimmed = line. trim ( ) ;
104
- if trimmed. starts_with ( "{" ) && trimmed. ends_with ( "}" ) {
105
- self . render_message ( match serde_json:: from_str ( & trimmed) {
106
- Ok ( parsed) => parsed,
107
- Err ( err) => {
108
- panic ! ( "failed to parse libtest json output; error: {err}, line: {line:?}" ) ;
109
- }
110
- } ) ;
111
- } else {
112
- // Handle non-JSON output, for example when --nocapture is passed.
113
- print ! ( "{line}" ) ;
114
- let _ = std:: io:: stdout ( ) . flush ( ) ;
103
+ match serde_json:: from_str ( & line) {
104
+ Ok ( parsed) => self . render_message ( parsed) ,
105
+ Err ( _err) => {
106
+ // Handle non-JSON output, for example when --nocapture is passed.
107
+ print ! ( "{line}" ) ;
108
+ let _ = std:: io:: stdout ( ) . flush ( ) ;
109
+ }
115
110
}
116
111
}
117
112
}
You can’t perform that action at this time.
0 commit comments