-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
I tried this code:
let system_time: SystemTime = ...;
// Add 1ns.
system_time.checked_add(Duration::new(0, 1)).unwrap();I expected to see this happen: The unwrap to fail because SystemTime on Windows only has an accuracy of 100ns.
Instead, this happened: The addition "works" by returning some, although the value is unchanged from the original one, meaning an addition of a Duration < 100ns is equivalent of adding Duration::ZERO.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.