D4465: httppeer: use our CBOR decoder

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Wed Sep 5 08:07:49 EDT 2018


pulkit added a comment.


  Queued the cbor patches. I think following can improve the code more:
  
  - Having a `cborutil.decodeone()` function which can make sure we only have one dcoded value and using that fn instead of `decodeall()[0]`
  - A `cborutil.encode()` function to use where we don't want to do `streamencode()` and use that in place of `b''.join()` pattern
  - Checking for an empty string being passed in `cborutil.decodeall()[0]` or `cborutil.decodeone()`
  
  What do you think?

REPOSITORY
  rHG Mercurial

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

To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list