You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey I was the person who reviewed your crate on Reddit :)
I looked at your changes and one thing made me curious. You're using now a NonZeroI8 instead of a u8 which would mean there could be also negative days. If that isn't what you intended, I would recommend using a NonZeroU8.
Another thing that could be a little bit annoying for users is the conversion from u64 to Day. Any conversion that could fail shouldn't use the From trait but rather the TryFrom one.
Hope that helps towards 1.0!
The text was updated successfully, but these errors were encountered:
If that isn't what you intended, I would recommend using a NonZeroU8.
Yes. Thanks for pointing that out. I'll probably have to change that, and may have to bump to a 2.0.
Another thing that could be a little bit annoying for users is the conversion from u64 to Day. Any conversion that could fail shouldn't use the From trait but rather the TryFrom one.
Also true, this was written before TryFrom was stabilized.
Although, since I have to make verify the amount of days per month anyways (sometimes it's 29 and sometimes it's 30), for the time being I can just say that a negative day is a ConversionError and put the API change on hold for now.
Hey I was the person who reviewed your crate on Reddit :)
I looked at your changes and one thing made me curious. You're using now a NonZeroI8 instead of a u8 which would mean there could be also negative days. If that isn't what you intended, I would recommend using a NonZeroU8.
Another thing that could be a little bit annoying for users is the conversion from u64 to Day. Any conversion that could fail shouldn't use the From trait but rather the TryFrom one.
Hope that helps towards 1.0!
The text was updated successfully, but these errors were encountered: