diff options
Diffstat (limited to 'vendor/time/src/formatting/iso8601.rs')
-rw-r--r-- | vendor/time/src/formatting/iso8601.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/time/src/formatting/iso8601.rs b/vendor/time/src/formatting/iso8601.rs index 29d443ef4..67bc66b21 100644 --- a/vendor/time/src/formatting/iso8601.rs +++ b/vendor/time/src/formatting/iso8601.rs @@ -85,17 +85,17 @@ pub(super) fn format_time<const CONFIG: EncodedConfig>( match Iso8601::<CONFIG>::TIME_PRECISION { TimePrecision::Hour { decimal_digits } => { let hours = (hours as f64) - + (minutes as f64) / Minute.per(Hour) as f64 - + (seconds as f64) / Second.per(Hour) as f64 - + (nanoseconds as f64) / Nanosecond.per(Hour) as f64; + + (minutes as f64) / Minute::per(Hour) as f64 + + (seconds as f64) / Second::per(Hour) as f64 + + (nanoseconds as f64) / Nanosecond::per(Hour) as f64; format_float(output, hours, 2, decimal_digits)?; } TimePrecision::Minute { decimal_digits } => { bytes += format_number_pad_zero::<2>(output, hours)?; bytes += write_if(output, Iso8601::<CONFIG>::USE_SEPARATORS, b":")?; let minutes = (minutes as f64) - + (seconds as f64) / Second.per(Minute) as f64 - + (nanoseconds as f64) / Nanosecond.per(Minute) as f64; + + (seconds as f64) / Second::per(Minute) as f64 + + (nanoseconds as f64) / Nanosecond::per(Minute) as f64; bytes += format_float(output, minutes, 2, decimal_digits)?; } TimePrecision::Second { decimal_digits } => { @@ -103,7 +103,7 @@ pub(super) fn format_time<const CONFIG: EncodedConfig>( bytes += write_if(output, Iso8601::<CONFIG>::USE_SEPARATORS, b":")?; bytes += format_number_pad_zero::<2>(output, minutes)?; bytes += write_if(output, Iso8601::<CONFIG>::USE_SEPARATORS, b":")?; - let seconds = (seconds as f64) + (nanoseconds as f64) / Nanosecond.per(Second) as f64; + let seconds = (seconds as f64) + (nanoseconds as f64) / Nanosecond::per(Second) as f64; bytes += format_float(output, seconds, 2, decimal_digits)?; } } |