Closed yancyribbens closed 2 weeks ago
I agree that the name _unwrap
feels weird and ad-hoc. This method exists for const reasons -- though maybe we don't need it anymore now that we can panic in const contexts? So maybe we can just drop it.
unchecked
is definitely not the right suffix for a method that checks its input and panics.
unchecked is definitely not the right suffix for a method that checks its input and panics.
Good point. Also directly bellow it there is already an _checked
function.
This method exists for const reasons -- though maybe we don't need it anymore now that we can panic in const contexts? So maybe we can just drop it.
Yeah I think it's superfluous really. If this is dropped, pub const fn from_vb_unchecked
can still be used in const context.
True, we can use unchecked
in a const context -- but we should also just make from_vb
const.
but we should also just make from_vb const.
I don't really have an opinion here since I'm not making use of it while in const context, although sure, that could be updated at the same time. I image there's probably lots of other functions that could be const context that are not..
Is there a precedence for naming methods with
unwrap
in the title? for example, from_vb_unwrap() seems ad-hoc when compared to the naming conventions used elsewhere in this library. Wouldn't it be more conventional to useunchecked
here instead of unwrap?