MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / two_leaf

Function two_leaf

cranelift/bforest/src/map.rs:1197–1204  ·  view source on GitHub ↗

Make a tree with two barely healthy leaf nodes: [ 10 20 30 40 ] [ 50 60 70 80 ]

(f: &mut MapForest<u32, f32>)

Source from the content-addressed store, hash-verified

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() {

Callers 2

remove_level1Function · 0.85
remove_level1_rightmostFunction · 0.85

Calls 3

newFunction · 0.50
clearMethod · 0.45
insertMethod · 0.45

Tested by 2

remove_level1Function · 0.68
remove_level1_rightmostFunction · 0.68