diff --git a/lib/src/default_revset_engine.rs b/lib/src/default_revset_engine.rs index cbd59520f..39da2f398 100644 --- a/lib/src/default_revset_engine.rs +++ b/lib/src/default_revset_engine.rs @@ -71,6 +71,14 @@ impl<'index> RevsetImpl<'index> { } } +impl fmt::Debug for RevsetImpl<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("RevsetImpl") + .field("inner", &self.inner) + .finish_non_exhaustive() + } +} + impl<'index> Revset<'index> for RevsetImpl<'index> { fn iter(&self) -> Box + '_> { Box::new(self.inner.iter().map(|index_entry| index_entry.commit_id())) diff --git a/lib/src/revset.rs b/lib/src/revset.rs index 8b32027f4..677f74cf4 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -1654,7 +1654,7 @@ pub fn resolve_symbols( ) } -pub trait Revset<'index> { +pub trait Revset<'index>: fmt::Debug { /// Iterate in topological order with children before parents. fn iter(&self) -> Box + '_>;