Avoid cloning enum entity type variants lists#2283
Conversation
Signed-off-by: John Kastner <jkastner@amazon.com>
78b9fe5 to
b98fc5c
Compare
| #[serde(rename = "enum")] | ||
| /// The nonempty set of possible EIDs | ||
| choices: NonEmpty<SmolStr>, | ||
| choices: NonEmpty<Eid>, |
There was a problem hiding this comment.
wasm build failure is probaly here. Need to figure out how to tell tsify this is still a string
There was a problem hiding this comment.
Is it possible to tell just Eid is a string?
There is a related issue with NonEmpty in wasm: #2155
It would be nice if we keep the NonEmpty, so that when we fix the type, all rust uses of NonEmpty are fixed. I think the issue references a possible place for a fix actually.
I think it's a minor thing though.
Coverage ReportHead Commit: Base Commit: Download the full coverage report. Coverage of Added or Modified Lines of Rust CodeRequired coverage: 80.00% Actual coverage: 80.77% Status: PASSED ✅ Details
Coverage of All Lines of Rust CodeRequired coverage: 80.00% Actual coverage: 87.57% Status: PASSED ✅ Details
|
There was a problem hiding this comment.
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage ReportHead Commit: Base Commit: Download the full coverage report. Coverage of Added or Modified Lines of Rust CodeRequired coverage: 80.00% Actual coverage: 80.77% Status: PASSED ✅ Details
Coverage of All Lines of Rust CodeRequired coverage: 80.00% Actual coverage: 87.54% Status: PASSED ✅ Details
|
Description of changes
Requires a change to previously untested protobuf parsing code. Tests are added separately in #2282
Issue #, if available
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-policy(e.g., changes to the signature of an existing API).cedar-policy(e.g., addition of a new API).cedar-policy.cedar-policy-core,cedar-validator, etc.)I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec(choose one, and delete the other options):cedar-spec, and how you have tested that your updates are correct.)cedar-spec. (Post your PR anyways, and we'll discuss in the comments.)I confirm that
docs.cedarpolicy.com(choose one, and delete the other options):cedar-docs. PRs should be targeted at astaging-X.Ybranch, notmain.)