cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
897 stars 80 forks source link

add `non_exhaustive` to more error types #1137

Closed khieta closed 3 months ago

khieta commented 3 months ago

Description of changes

Adds non_exhaustive to some error types that would be reasonable to extend in the future (IMO). What prompted this was that I wanted to backport #890 to 3.3.x, but found that I couldn't due to a new variant in SchemaError. This would have been fine if the error type had been non-exhaustive.

Also includes a quick fix to a comment in api.rs.

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

I confirm that this PR (choose one, and delete the other options):

I confirm that cedar-spec (choose one, and delete the other options):