We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
alloc
1 parent 11b2058 commit f28ffd0Copy full SHA for f28ffd0
src/k_smallest.rs
@@ -1,5 +1,5 @@
1
-use std::collections::BinaryHeap;
2
-use std::cmp::Ord;
+use alloc::collections::BinaryHeap;
+use core::cmp::Ord;
3
4
pub(crate) fn k_smallest<T: Ord, I: Iterator<Item = T>>(mut iter: I, k: usize) -> BinaryHeap<T> {
5
if k == 0 { return BinaryHeap::new(); }
0 commit comments