dsalgo 0.3.7

A package for Datastructures and Algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
mod tests {
    #[test]
    fn test() {
        #[derive(Debug)]
        struct Data {
            value: usize,
        }

        impl Data {
            fn mut_value(&mut self) -> &mut usize { &mut self.value }
        }

        let mut data = Data { value: 0 };
        *data.mut_value() += 1;
        println!("{:?}", data);
    }
}