D5550: rust-cpython: bindings for MissingAncestors
kevincox (Kevin Cox)
phabricator at mercurial-scm.org
Tue Jan 15 03:02:27 EST 2019
kevincox added inline comments.
INLINE COMMENTS
> gracinet wrote in ancestors.rs:170
> Got this one in the wrong direction (sorry about that!) : in this case, this is a conversion from Rust, so we de have proper `size_hint()`
> Still, I'll keep in mind the question for the other direction (in which we are using `collect()` already.
That makes sense. Also if you still want to use iterators without wiring up size hints properly you could do something like:
let v = Vector::with_capacity(hint);
v.extend(iterators);
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5550
To: gracinet, #hg-reviewers
Cc: yuja, durin42, kevincox, mercurial-devel
More information about the Mercurial-devel
mailing list