Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: max_size: various small refactoring #223

Merged
merged 3 commits into from
Sep 18, 2023
Merged

feat: max_size: various small refactoring #223

merged 3 commits into from
Sep 18, 2023

Commits on Sep 17, 2023

  1. feat: max_size: various small refactoring

    * Change is_zero_size to short-circuit internal all function when
      first element which isn’t zero sized is found.
    
    * Change is_zero_size to use vector of str slices as stack.  There’s
      no need to allocate strings.  This also makes it possible to share
      the same stack as max_serialized_size_impl.
    
    * Introduce Recursive error type to better encode error condition of
      is_zero_size.
    
    * Change max_serialized_size’s count argument to NonZeroUsize to
      encode in type system that the count is in fact never zero.  In
      places where it might end up zero, the function short-circuits.
    mina86 committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    348cf6d View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. Merge branch 'master' into b

    dj8yfo authored Sep 18, 2023
    Configuration menu
    Copy the full SHA
    600fbbc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31d54e4 View commit details
    Browse the repository at this point in the history