diff --git a/lib/src/revset.rs b/lib/src/revset.rs index afcd86ea3..39aa5e249 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -1525,9 +1525,7 @@ pub trait Revset<'index> { // All revsets currently iterate in order of descending index position fn iter(&self) -> Box> + '_>; - fn is_empty(&self) -> bool { - self.iter().next().is_none() - } + fn is_empty(&self) -> bool; } trait ToPredicateFn<'index> { @@ -1645,6 +1643,10 @@ impl<'index> Revset<'index> for RevsetImpl<'index> { fn iter(&self) -> Box> + '_> { self.inner.iter() } + + fn is_empty(&self) -> bool { + self.iter().next().is_none() + } } struct EagerRevset<'index> {