MCPcopy Create free account
hub / github.com/douchuan/algorithm / drop_clear

Function drop_clear

tests/test_rb_tree2.rs:124–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123#[test]
124fn drop_clear() {
125 use algo::common::drop::{self, Elem};
126 drop::with(|ctx| {
127 let mut tree = Tree::default();
128 for v in 0..100 {
129 tree.insert(v, Elem);
130 }
131 drop(tree);
132 assert_eq!(100, ctx.get());
133 });
134}
135
136#[test]
137fn drop_with_delete() {

Callers

nothing calls this directly

Calls 2

withFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected