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
currently the blanket From<T: Into<Integer>> impl allows creating an instance of ConstrainedInteger<START, END> with a value that exists outside of the constrained value. this should probably be changed to be a TryFrom impl instead where the bounds can be verified and Err returned if the converted-from value is outside of the range, though this would be a breaking change.
example:
let bar = rasn::types::ConstrainedInteger::<5,100>::from(0u32);
The text was updated successfully, but these errors were encountered:
I attempted to implement this earlier and seems like the change for some reason runs afoul of a overlapping impl from core, so I'll have to investigate what's going on with that some other time.
currently the blanket
From<T: Into<Integer>>
impl allows creating an instance ofConstrainedInteger<START, END>
with a value that exists outside of the constrained value. this should probably be changed to be aTryFrom
impl instead where the bounds can be verified andErr
returned if the converted-from value is outside of the range, though this would be a breaking change.example:
The text was updated successfully, but these errors were encountered: