Add BigUint::{is, next}_power_of_two()#212
Add BigUint::{is, next}_power_of_two()#212PatrickNorton wants to merge 2 commits intorust-num:masterfrom
BigUint::{is, next}_power_of_two()#212Conversation
|
On naming, there are these guidelines between There is also the precedent of the There are also a lot of So if we want to support both owned and borrowed, I could see either of these options working well:
|
|
I'd think it's better to go with the by-value as the default; it seems better to promote the more efficient method as the default and let people switch out of it when they need it. |
|
Is there anything still blocking this being merged? |
These are two more integer methods we don't have on
BigUint, which would be nice to have.Unresolved questions:
next_power_of_twotakesselfby value instead of reference, to prevent unnecessary clones. Is that the right decision?next_power_of_twotakeselfby reference, should we add ato_next_power_of_twomethod that takes it by value?