-
-
Couldn't load subscription status.
- Fork 291
Closed
Labels
A-third-partyArea: implementations of traits from other cratesArea: implementations of traits from other cratesC-bugCategory: bug in current codeCategory: bug in current code
Description
The issue is here:
Line 257 in aca5c36
| self.whole_seconds(), |
When feature serde_human_readable is enabled, the serializing code incorrectly assumes that for a sub-second negative duration, the self.whole_seconds() will provide the sign during printing. Similar issue exists with deserialization code.
The bug will result with subsecond negative Durations being serialized into positive ones, and negative elsewhere-serialized Durations to be deserialized into positive ones.
Also the comment here:
Line 44 in aca5c36
| /// Number of nanoseconds within the second. The sign always matches the `seconds` field. |
nanoseconds sign will NOT match the seconds sign when seconds is 0 and nanoseconds is negative.Metadata
Metadata
Assignees
Labels
A-third-partyArea: implementations of traits from other cratesArea: implementations of traits from other cratesC-bugCategory: bug in current codeCategory: bug in current code