Conditionally compile dead code in interval_set.rs

This commit is contained in:
Zhang Junyang
2025-02-09 21:16:24 +08:00
committed by Tate, Hongliang Tian
parent 0fc2bccd44
commit e1ced5f385

View File

@ -100,6 +100,7 @@ where
///
/// If no such item exists, returns [`None`]. Otherwise, returns the item
/// that contains the point.
#[cfg(ktest)]
pub fn take_one(&mut self, point: &K) -> Option<V> {
let mut cursor = self
.btree
@ -122,6 +123,7 @@ where
///
/// This method returns a draining iterator that removes the items from the
/// interval set.
#[cfg(ktest)]
pub fn take<'a>(&'a mut self, range: &Range<K>) -> IntervalDrain<'a, K, V> {
let cursor = self
.btree