diff options
Diffstat (limited to 'src/metric.rs')
-rw-r--r-- | src/metric.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/metric.rs b/src/metric.rs index d37d2bf..d9938e4 100644 --- a/src/metric.rs +++ b/src/metric.rs @@ -373,6 +373,17 @@ impl<T> ExhaustiveSearch<T> { pub fn len(&self) -> usize { self.0.len() } + + /// Check if this index is empty. + pub fn is_empty(&self) -> bool { + self.0.is_empty() + } +} + +impl<T> Default for ExhaustiveSearch<T> { + fn default() -> Self { + Self::new() + } } impl<T> FromIterator<T> for ExhaustiveSearch<T> { |