-
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
breaking changeIssues that require a breaking change for resolution.Issues that require a breaking change for resolution.
Description
The only such methods currently are SignedDuration::try_from_secs_f64 and its 32-bit counter-part. Currently, these return the god jiff::Error type. But in std, the corresponding methods return a specific TryFromFloatSecsError.
I think I chose the jiff::Error because it avoided defining a new error type and these methods seemed a little niche to me.
But I do somewhat expect that std::time::Duration will eventually get other fallible constructors, and they're either going to return an Option or a Result with their own specific error. So it might be good to decide on this for Jiff 1.0. I suppose the conservative route is to return a new and specific error type. But this does add API noise.
Metadata
Metadata
Assignees
Labels
breaking changeIssues that require a breaking change for resolution.Issues that require a breaking change for resolution.