This revision was automatically updated to reflect the committed changes.
Closed by commit rHGef54bd33b476: rust: core implementation for lazyancestors
(authored by gracinet, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
gracinet updated this revision to Diff 12954.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5440?vs=12951=12954
REVISION DETAIL
https://phab.mercurial-scm.org/D5440
AFFECTED FILES
rust/hg-core/src/ancestors.rs
rust/hg-core/src/lib.rs
gracinet updated this revision to Diff 12951.
gracinet marked 4 inline comments as done.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5440?vs=12877=12951
REVISION DETAIL
https://phab.mercurial-scm.org/D5440
AFFECTED FILES
gracinet added a comment.
@yuja, yes a `Graph` not implementing `Clone` is already a good thing, as it
avoids to implement `Clone` in `hg-direct-ffi` prematurely. I think the whole
`hg::LazyAncestors` can end up being useful from core Rust code, too, that's
why I prefer that to a
yuja added a comment.
> - 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.
> --- 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
kevincox accepted this revision.
kevincox added inline comments.
INLINE COMMENTS
> ancestors.rs:120
> +/// This is mostly meant for iterators backing a lazy ancestors set
> +pub fn empty() -> bool {
> +if self.visit.len() > 0 {
Can you clarify this `is_empty` to match rust
gracinet created this revision.
Herald added subscribers: mercurial-devel, kevincox, durin42.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Once exposed through appropriate bindings, this
should be able to replace ancestor.lazyancestors
entirely.
REPOSITORY
rHG Mercurial