mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Conditionally compile dead code in interval_set.rs
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
0fc2bccd44
commit
e1ced5f385
@ -100,6 +100,7 @@ where
|
|||||||
///
|
///
|
||||||
/// If no such item exists, returns [`None`]. Otherwise, returns the item
|
/// If no such item exists, returns [`None`]. Otherwise, returns the item
|
||||||
/// that contains the point.
|
/// that contains the point.
|
||||||
|
#[cfg(ktest)]
|
||||||
pub fn take_one(&mut self, point: &K) -> Option<V> {
|
pub fn take_one(&mut self, point: &K) -> Option<V> {
|
||||||
let mut cursor = self
|
let mut cursor = self
|
||||||
.btree
|
.btree
|
||||||
@ -122,6 +123,7 @@ where
|
|||||||
///
|
///
|
||||||
/// This method returns a draining iterator that removes the items from the
|
/// This method returns a draining iterator that removes the items from the
|
||||||
/// interval set.
|
/// interval set.
|
||||||
|
#[cfg(ktest)]
|
||||||
pub fn take<'a>(&'a mut self, range: &Range<K>) -> IntervalDrain<'a, K, V> {
|
pub fn take<'a>(&'a mut self, range: &Range<K>) -> IntervalDrain<'a, K, V> {
|
||||||
let cursor = self
|
let cursor = self
|
||||||
.btree
|
.btree
|
||||||
|
Reference in New Issue
Block a user