Skip to content

Commit

Permalink
Improve protovalidate overloads (#36)
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 authored Sep 12, 2023
1 parent 0f4093e commit 841e8e4
Show file tree
Hide file tree
Showing 4 changed files with 257 additions and 235 deletions.
Loading

0 comments on commit 841e8e4

Please sign in to comment.