dsalgo 0.2.6

A package for Datastructures and Algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
#[cfg(test)]
mod tests {
    #[test]
    fn test_next_power_of_two() {
        assert_eq!(0usize.next_power_of_two(), 1);
        assert_eq!(1usize.next_power_of_two(), 1);
        assert_eq!(2usize.next_power_of_two(), 2);
        assert_eq!(3usize.next_power_of_two(), 4);
    }
}