Make a tree with two barely healthy leaf nodes: [ 10 20 30 40 ] [ 50 60 70 80 ]
(f: &mut MapForest<u32, f32>)
| 1195 | // Make a tree with two barely healthy leaf nodes: |
| 1196 | // [ 10 20 30 40 ] [ 50 60 70 80 ] |
| 1197 | fn two_leaf(f: &mut MapForest<u32, f32>) -> Map<u32, f32> { |
| 1198 | f.clear(); |
| 1199 | let mut m = Map::new(); |
| 1200 | for n in 1..9 { |
| 1201 | m.insert(n * 10, n as f32, f, &()); |
| 1202 | } |
| 1203 | m |
| 1204 | } |
| 1205 | |
| 1206 | #[test] |
| 1207 | fn remove_level1() { |