Skip to content

Commit

Permalink
Improve protovalidate overloads
Browse files Browse the repository at this point in the history
Update all of the protovalidate overload functions to add proper type
checking and return Err.noSuchOverload if the types are incorrect.
Greatly simplify the unique implementation as it didn't need to support
non-list arguments. Fix a bug in the unique implementation for bytes (if
the bytes contained invalid UTF-8). Add testcases for unique and
additional tests for invalid arguments.

Update Format.format to use exceptions for control flow instead of
having to distinguish Val.Err from other types (a lot of places were
just returning null).

Remove all places where we used '==' to compare object type instances
with comparing using enum types (which is safe for '==' comparison).
  • Loading branch information
pkwarren committed Sep 12, 2023
1 parent 0f4093e commit decdc67
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 232 deletions.
Loading

0 comments on commit decdc67

Please sign in to comment.