Closed Kroisse closed 5 years ago
Hi! Thanks for your PR :)
Overall, the code looks good to me, but there are a few things that could be improved. Don't be overwhelmed by the amount of text below, it's all small things and I'm happy to answer further questions.
std::iter::Sum
, but Sum
and Product
have to be imported from core
since this is a no_std
crate.Sum
and Product
makes things slightly less clear, but importing core::iter
and referring to them as iter::Sum
and iter::Product
would be more consistent with the rest of the code while saving some characters for people reading the code.UInt
s but not Int
(the reasons for which are layed out in #1). These new impls should stay consistent with the existing operations and wrap UInt
s in release mode. See https://github.com/jplatte/js_int/blob/75868bcc7722a934ba61b24782e88743a0a4a501/src/lib.rs#L894-L899pub
lic) constructors that wrap this logic instead. I don't have a very good idea for a name, but new_
could work.new_
method as I suggested in the crossed-out sentence. If you rebase your PR you can use them.Done in ea03c1b3016f2ee57d54eec03f36bb7f0f3ea726
Fixes #10.