use convenient_skiplist::{RangeHint, SkipList}; #[global_allocator] static ALLOCATOR: checkers::Allocator = checkers::Allocator::system(); // checkers bug: dbg! statements cause issues. #[checkers::test] fn test_allocations() { let mut sk: SkipList = SkipList::new(); let _: Vec = sk.iter_all().cloned().collect(); let _: Vec = sk.range(&10, &20).cloned().collect(); let _: Vec = sk.range(&10, &20).cloned().collect(); let _: Vec = sk .range_with(|&i| { if i < 2 { RangeHint::SmallerThanRange } else if i > 10 { RangeHint::LargerThanRange } else { RangeHint::InRange } }) .cloned() .collect(); for i in 0..50u32 { sk.insert(i); } sk.contains(&13); let _: Vec = sk.iter_all().cloned().collect(); let _: Vec = sk.range(&10, &20).cloned().collect(); let _: Vec = sk .range_with(|&i| { if i < 2 { RangeHint::SmallerThanRange } else if i > 10 { RangeHint::LargerThanRange } else { RangeHint::InRange } }) .cloned() .collect(); let _ = sk.pop_max(1); let _ = sk.pop_min(1); let _ = sk.at_index(1); let _ = sk.index_of(&1); }