-
-
Notifications
You must be signed in to change notification settings - Fork 41
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_add
properly fallible
Previously, it was an API bug for this routine to be infallible since we specifically disallow adding calendar spans on `Timestamp`. To paper over this, we made the API panic in such cases. But now we properly return an error. It is lamentable that an API like this is fallible. And the generics means that even adding a `SignedDuration`, which ought to be infallible, callers still need to deal with the possible error path. Fixes #36
- Loading branch information
1 parent
b0c3a38
commit fee3738
Showing
3 changed files
with
46 additions
and
37 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
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
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