enarx / ciborium

CBOR utilities
Other
222 stars 54 forks source link

feat: add from_reader_with_recursion_limit #84

Closed daviddrysdale closed 1 year ago

daviddrysdale commented 1 year ago

This change adds a from_reader_with_recursion_limit() variant of from_reader(), allowing the maximum recursion limit to be set explicitly.

Fixes #58 which asks for the ability to set a higher recursion limit, but this is mainly intended for environments where the default limit of 256 is too large (i.e. the stack gets exhausted before the limit is hit).

rjzak commented 1 year ago

Please re-word the commit message so the conventional commit checker passes:

 Error: 1 of the pull request's commits are not valid Conventional Commits
❌ Commit (c6825a20): feat: add from_reader_with_recursion_limit
  Error: [C024] A colon is required in git-trailers
  Fixes #58 which asks for the ability to set a higher recursion limit,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       : #58 which asks for the ability to set a higher recursion limit,
daviddrysdale commented 1 year ago

I couldn't get commisery to produce the same error locally (maybe I need some config file?) but I tried adding the colon suggested by the error – hope that helps. Thanks!