Commit bbdb177 1 parent fbcd538 commit bbdb177 Copy full SHA for bbdb177
File tree 4 files changed +75
-35
lines changed
4 files changed +75
-35
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ rayon = "1.5.1"
55
55
56
56
serde = { version = " 1.0" , features = [" derive" ] }
57
57
shlex = " 1.1.0"
58
- humantime = " 2"
59
- humantime-serde = " 1"
58
+ jiff = { version = " 0.2.4" , features = [" serde" ] }
60
59
toml_edit = { version = " 0.22.13" , features = [" serde" ] }
61
60
escargot = { version = " 0.5.13" , optional = true }
62
61
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use std::eprintln;
11
11
#[ cfg( not( feature = "color" ) ) ]
12
12
use std:: io:: stderr;
13
13
14
+ use jiff:: SignedDuration ;
14
15
use rayon:: prelude:: * ;
15
16
use snapbox:: data:: DataFormat ;
16
17
use snapbox:: dir:: FileType ;
@@ -68,10 +69,11 @@ impl Runner {
68
69
status. spawn. status. summary( ) ,
69
70
) ;
70
71
if let Some ( duration) = status. duration {
72
+ let duration = SignedDuration :: from_nanos ( duration. as_nanos ( ) as i64 ) ;
71
73
let _ = write ! (
72
74
stderr,
73
75
" {}" ,
74
- palette. hint( humantime :: format_duration ( duration) ) ,
76
+ palette. hint( jiff :: fmt :: friendly :: SpanPrinter :: new ( ) . duration_to_string ( & duration) ) ,
75
77
) ;
76
78
}
77
79
let _ = writeln ! ( stderr) ;
@@ -90,10 +92,11 @@ impl Runner {
90
92
palette. error( "failed" ) ,
91
93
) ;
92
94
if let Some ( duration) = status. duration {
95
+ let duration = SignedDuration :: from_nanos ( duration. as_nanos ( ) as i64 ) ;
93
96
let _ = write ! (
94
97
stderr,
95
98
" {}" ,
96
- palette. hint( humantime :: format_duration ( duration) ) ,
99
+ palette. hint( jiff :: fmt :: friendly :: SpanPrinter :: new ( ) . duration_to_string ( & duration) ) ,
97
100
) ;
98
101
}
99
102
let _ = writeln ! ( stderr) ;
Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ impl From<OneShot> for TryCmd {
559
559
expected_stderr_source: None ,
560
560
expected_stderr: stderr. map( crate :: Data :: text) ,
561
561
binary,
562
- timeout,
562
+ timeout: timeout . map ( |e| e . unsigned_abs ( ) ) ,
563
563
} ] ,
564
564
fs,
565
565
}
@@ -645,8 +645,7 @@ pub struct OneShot {
645
645
#[ serde( default ) ]
646
646
pub ( crate ) binary : bool ,
647
647
#[ serde( default ) ]
648
- #[ serde( deserialize_with = "humantime_serde::deserialize" ) ]
649
- pub ( crate ) timeout : Option < std:: time:: Duration > ,
648
+ pub ( crate ) timeout : Option < jiff:: SignedDuration > ,
650
649
#[ serde( default ) ]
651
650
pub ( crate ) fs : Filesystem ,
652
651
}
You can’t perform that action at this time.
0 commit comments