File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ impl Display for Inner {
4848 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result {
4949 if let Some ( time) = self . 0 {
5050 let ( total_seconds, nanoseconds) = time. to_seconds_and_subsec_nanoseconds ( ) ;
51- let ( total_seconds, nanoseconds) = if total_seconds < 0 {
51+ let ( total_seconds, nanoseconds) = if ( total_seconds | nanoseconds as i64 ) < 0 {
5252 // Since, this Formatter is used for writing out split files, we
5353 // have to use an ASCII Minus here.
5454 f. write_str ( ASCII_MINUS ) ?;
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ impl TimeFormatter<'_> for Days {
4545impl Display for Inner {
4646 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result {
4747 if let Some ( time) = self . time {
48- let total_seconds = time. to_duration ( ) . whole_seconds ( ) ;
49- let total_seconds = if total_seconds < 0 {
48+ let ( total_seconds, nanoseconds ) = time. to_seconds_and_subsec_nanoseconds ( ) ;
49+ let total_seconds = if ( total_seconds | nanoseconds as i64 ) < 0 {
5050 f. write_str ( MINUS ) ?;
5151 ( -total_seconds) as u64
5252 } else {
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ impl Display for Inner {
7474 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result {
7575 if let Some ( time) = self . time {
7676 let ( total_seconds, nanoseconds) = time. to_seconds_and_subsec_nanoseconds ( ) ;
77- let ( total_seconds, nanoseconds) = if total_seconds < 0 {
77+ let ( total_seconds, nanoseconds) = if ( total_seconds | nanoseconds as i64 ) < 0 {
7878 f. write_str ( MINUS ) ?;
7979 ( ( -total_seconds) as u64 , ( -nanoseconds) as u32 )
8080 } else {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl Display for Inner {
6868 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result {
6969 if let Some ( time) = self . time {
7070 let ( total_seconds, nanoseconds) = time. to_seconds_and_subsec_nanoseconds ( ) ;
71- let ( total_seconds, nanoseconds) = if total_seconds < 0 {
71+ let ( total_seconds, nanoseconds) = if ( total_seconds | nanoseconds as i64 ) < 0 {
7272 f. write_str ( MINUS ) ?;
7373 ( ( -total_seconds) as u64 , ( -nanoseconds) as u32 )
7474 } else {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ impl Display for Inner {
6666 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result {
6767 if let Some ( time) = self . time {
6868 let ( total_seconds, nanoseconds) = time. to_seconds_and_subsec_nanoseconds ( ) ;
69- let ( total_seconds, nanoseconds) = if total_seconds < 0 {
69+ let ( total_seconds, nanoseconds) = if ( total_seconds | nanoseconds as i64 ) < 0 {
7070 f. write_str ( MINUS ) ?;
7171 ( ( -total_seconds) as u64 , ( -nanoseconds) as u32 )
7272 } else {
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ impl TimeFormatter<'_> for Time {
6969impl Display for TimeInner {
7070 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result {
7171 if let Some ( time) = self . time {
72- let total_seconds = time. to_duration ( ) . whole_seconds ( ) ;
73- let total_seconds = if total_seconds < 0 {
72+ let ( total_seconds, nanoseconds ) = time. to_seconds_and_subsec_nanoseconds ( ) ;
73+ let total_seconds = if ( total_seconds | nanoseconds as i64 ) < 0 {
7474 f. write_str ( MINUS ) ?;
7575 ( -total_seconds) as u64
7676 } else {
You can’t perform that action at this time.
0 commit comments