D5440: rust: core implementation for lazyancestors

2018-12-23 Thread gracinet (Georges Racinet)
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

D5440: rust: core implementation for lazyancestors

2018-12-22 Thread gracinet (Georges Racinet)
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

D5440: rust: core implementation for lazyancestors

2018-12-22 Thread gracinet (Georges Racinet)
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

D5440: rust: core implementation for lazyancestors

2018-12-22 Thread gracinet (Georges Racinet)
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

D5440: rust: core implementation for lazyancestors

2018-12-15 Thread yuja (Yuya Nishihara)
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.

Re: D5440: rust: core implementation for lazyancestors

2018-12-15 Thread Yuya Nishihara
> --- 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

D5440: rust: core implementation for lazyancestors

2018-12-15 Thread kevincox (Kevin Cox)
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

D5440: rust: core implementation for lazyancestors

2018-12-15 Thread gracinet (Georges Racinet)
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