pub fn max_height(self) -> Height {
        let r = (usize::MAX.count_ones() - 1 - self.0.get().leading_zeros()) as u8;
        r.try_into()
         .unwrap_or_else(|_| unsafe { unreachable_unchecked!() })
    }
/// Returns the maximum height tree within this length.
///
/// # Examples
///
/// ```
/// # use proofmarshal_core::collections::length::InnerLength;
/// # use proofmarshal_core::collections::height::Height;
/// assert_eq!(InnerLength::new(0b11).unwrap()
///                        .max_height(),
///            Height::new(1).unwrap());
///
/// assert_eq!(InnerLength::new(0b1100000000000000000000000000000000000000000000000000000000000000).unwrap()
///                        .max_height(),
///            Height::new(63).unwrap());
/// ```
Returns the maximum height tree within this length.
Returns the maximum height tree within this length .
pub fn max_height(self) -> Height {
        let r = (usize::MAX.count_ones() - 1 - self.0.get().leading_zeros()) as u8;
        r.try_into()
         .unwrap_or_else(|_| unsafe { unreachable_unchecked!() })
    }
pub fn max_height ( self ) -> Height { let r = ( usize :: MAX . count_ones ( ) - 1 - self . 0 . get ( ) . leading_zeros ( ) ) as u8 ; r . try_into ( ) . unwrap_or_else ( | _ | unsafe { unreachable_unchecked ! ( ) } ) }
Returns the maximum height tree within this length.
Returns the maximum height tree within this length .
self
examples
None
use proofmarshal_core::collections::length::innerlength;
None
use proofmarshal_core::collections::height::height;
assert_eq!(InnerLength::new(0b11).unwrap()
.max_height(),
Height::new(1).unwrap()).


assert_eq! ( InnerLength :: new ( 0b11 ) . unwrap () . max_height () Height :: new ( 1 ) . unwrap () ) .