diff --git a/src/range.rs b/src/range.rs index bbca4da2..a7eb0e82 100644 --- a/src/range.rs +++ b/src/range.rs @@ -119,6 +119,11 @@ impl Range { segments: SmallVec::one((Included(v1.into()), Excluded(v2.into()))), } } + + /// Whether the set is empty, i.e. it has not ranges + pub fn is_empty(&self) -> bool { + self.segments.is_empty() + } } impl Range {