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
#[cfg(test)]
mod tests {
    #[test]
    fn test() {
        #[derive(Debug)]
        struct Data {
            value: usize,
        }
        let a = Data { value: 1 };
        let mut b = Box::new(a);
        b.value += 1;
        println!("{:?}", b);
        // let mut c = Box::new(a);
        // compile error because a has been removed.
    }
}