Closed brendanzab closed 6 years ago
I thought about this, too. However, I didn't come to a pleasant solution until now since I liked the expliciteness in the from_uN
and from_iN
forms very much. I must admit that using the From<T>
trait is more idiomatic and will add them, too.
Keep in mind that this library is still very far from completion, many things will change so maybe the new From<T>
impls will entirely replace the explicit constructors in the end. The library and its API is still under heavy development.
Done (https://github.com/Robbepop/apint/commit/6cea2a45a9d64deda49f94241ef48987fdda0849) & closed.
Thank you for this suggestion! :)
It would probably be more idiomatic (and useful) to have
From<u8>
,From<u16>
, ... etc. impls than separate constructor methods.