Function std::num::checked_next_power_of_two
pub fn checked_next_power_of_two<T: Unsigned + Int>(n: T) -> Option<T>
Returns the smallest power of 2 greater than or equal to n
. If the next
power of two is greater than the type's maximum value, None
is returned,
otherwise the power of 2 is wrapped in Some
.