We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f07235e + 0917bcc commit 511252bCopy full SHA for 511252b
src/binary_heap.rs
@@ -615,6 +615,26 @@ mod tests {
615
assert_eq!(Droppable::count(), 0);
616
}
617
618
+ #[test]
619
+ fn into_vec() {
620
+ droppable!();
621
+
622
+ let mut h: BinaryHeap<Droppable, Max, 2> = BinaryHeap::new();
623
+ h.push(Droppable::new()).ok().unwrap();
624
625
+ h.pop().unwrap();
626
627
+ assert_eq!(Droppable::count(), 1);
628
629
+ let v = h.into_vec();
630
631
632
633
+ core::mem::drop(v);
634
635
+ assert_eq!(Droppable::count(), 0);
636
+ }
637
638
#[test]
639
fn min() {
640
let mut heap = BinaryHeap::<_, Min, 16>::new();
0 commit comments