-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
timestamp: make saturating arithmetic panic for non-uniform units
The saturating methods *should* return an error. But I goofed on the API. So at this point, our two choices are: leave it as-is, which produces completely incorrect results when there are non-zero units of days or greater, or panic when it occurs. I think a panic is better. In Jiff 0.2, these APIs will be made fallible. And hopefully by then we'll have truly infallible APIs that accept an "absolute" duration. Partially addresses #36
- Loading branch information
1 parent
7f1d3c3
commit c34da2b
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters