[Changed Subscribers] D10749: dirstate-v2: Make more APIs fallible, returning Result

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Fri May 21 09:47:19 UTC 2021


Alphare added inline comments.

INLINE COMMENTS

> dirstate.rs:80
>  pub type StateMap = FastHashMap<HgPathBuf, DirstateEntry>;
> -pub type StateMapIter<'a> =
> -    Box<dyn Iterator<Item = (&'a HgPath, DirstateEntry)> + Send + 'a>;
> +pub type StateMapIter<'a> = Box<
> +    dyn Iterator<

Getting to 5 lines-high type declaration without Futures is a feat!

> dirstate_map.rs:518
> +/// `Result`.
> +fn filter_map_results<'a, I, F, A, B, E>(
> +    iter: I,

Isn't there such an iterator in `itertools` already? Since we depend on it anyway.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10749/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10749

To: SimonSapin, #hg-reviewers
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210521/13b32015/attachment-0002.html>


More information about the Mercurial-patches mailing list