> --- a/rust/hg-core/src/lib.rs > +++ b/rust/hg-core/src/lib.rs > @@ -2,8 +2,10 @@ > // > // This software may be used and distributed according to the terms of the > // GNU General Public License version 2 or any later version. > +use std::clone::Clone;
Nit: it's in prelude. > /// The simplest expression of what we need of Mercurial DAGs. > -pub trait Graph { > +pub trait Graph: Clone { I think it's the requirement of the caller, i.e. `G: Graph + Clone`. Not all graphs have to be clone-able. Alternatively, maybe the LazyAncestor can be moved to the cpython crate, where PyClone is available. > + /// Tell if the iterator is about an empty set > + /// > + /// The result does not depend whether the iterator has been consumed > + /// or not. > + /// This is mostly meant for iterators backing a lazy ancestors set > + pub fn empty(&self) -> bool { Nit: s/empty/is_empty/ because `empty()` can be a verb. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel