D7788: rust-node: binary Node and conversion utilities

gracinet (Georges Racinet) phabricator at mercurial-scm.org
Mon Jan 20 08:17:59 EST 2020


gracinet added a comment.


  @durin42 @martinvonz we might have a nice path forward with this, with the suggestion of @kevincox to make `Node` a truly defined type, not just an alias, with a private member for the bytes.
  
  Indeed I find it important to know if a node information is complete or merely a prefix. With a truly defined type, the assumption that it's 20 bytes long would be completely encapsulated in the `Node` type. It would then be very easy (much easier than with Python code) to change it to something else, whether that'd be a longer bag of bytes, or a struct with two values, an enum with alternatives for sha-1 or sha-2 etc.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-devel mailing list