From adaafdd7043507cbceae65e78c38954e47103b5c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 11 May 2020 11:33:45 -0400 Subject: Fix some clippy lints --- src/metric.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/metric.rs') 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 ExhaustiveSearch { 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 Default for ExhaustiveSearch { + fn default() -> Self { + Self::new() + } } impl FromIterator for ExhaustiveSearch { -- cgit v1.2.3