File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ impl ReportWriter for JsonReportWriter {
4444 } else {
4545 serde_json:: to_string ( & output)
4646 }
47- . map_err ( |e| CliDiagnostic :: io_error ( std:: io:: Error :: new ( std :: io :: ErrorKind :: Other , e) ) ) ?;
47+ . map_err ( |e| CliDiagnostic :: io_error ( std:: io:: Error :: other ( e) ) ) ?;
4848
4949 console. log ( markup ! ( { serialized } ) ) ;
5050 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -95,7 +95,11 @@ impl Display for FileDiagnostics {
9595 parts. push ( format ! (
9696 "{} {}" ,
9797 counts. errors,
98- if counts. errors == 1 { "error" } else { "errors" }
98+ if counts. errors == 1 {
99+ "error"
100+ } else {
101+ "errors"
102+ }
99103 ) ) ;
100104 }
101105 if counts. warnings > 0 {
Original file line number Diff line number Diff line change @@ -167,9 +167,7 @@ fn normalize_durations(input: &str) -> String {
167167 while let Some ( dot_rel) = rest[ dot_search..] . find ( '.' ) {
168168 let dot_pos = dot_search + dot_rel;
169169 let after_dot = dot_pos + 1 ;
170- if after_dot >= rest. len ( )
171- || !rest. as_bytes ( ) [ after_dot] . is_ascii_digit ( )
172- {
170+ if after_dot >= rest. len ( ) || !rest. as_bytes ( ) [ after_dot] . is_ascii_digit ( ) {
173171 found_end = Some ( start + dot_pos) ;
174172 break ;
175173 }
You can’t perform that action at this time.
0 commit comments