D7791: rust-nodemap: NodeMap trait with simplest implementor

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Jan 22 11:23:19 EST 2020


martinvonz added inline comments.

INLINE COMMENTS

> gracinet wrote in nodemap.rs:150
> I've looked into trait alias while working on this, for the exact same reason, and went through most you guys are saying about that.
> 
> Seems that this is complicated for the language because they'd like to have the
> possibility to `impl` it.

How about something like this then?

  type BlockSource = Box<dyn Deref<Target = [Block]> + Send>;
  type ByteSource = Box<dyn Deref<Target = [u8]> + Send>;

I won't insist, so up to you if you think it helps.

REPOSITORY
  rHG Mercurial

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

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

To: gracinet, #hg-reviewers, kevincox
Cc: Alphare, martinvonz, durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list