Skip to content

Conversation

@aaronjeline
Copy link

@aaronjeline aaronjeline commented Jan 16, 2024

Description of changes

Adds EntityId::new()

Issue #, if available

#553

Checklist for requesting a review

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

  • A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).

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

  • Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).

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

  • Does not require updates because my change does not impact the Cedar Dafny model or DRT infrastructure.

Disclaimer

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Co-authored-by: Craig Disselkoen <[email protected]>
/// All strings are valid [`EntityId`]s, and can be
/// constructed either using [`EntityId::new`]
/// or by using the implementation of [`FromStr`]. This implementation is [`Infallible`], so the
/// parsed [`EntityId`] can be extracted safely.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably update the example to use new

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I want to leave the .parse() example because it's slightly weird to newcomers

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the parse example to the FromStr doc string? Most users should be using new to construct this

@aaronjeline aaronjeline merged commit 192f168 into main Jan 16, 2024
@aaronjeline aaronjeline deleted the aaronjeline/issue553 branch January 16, 2024 16:46
@sarahcec sarahcec added the 3.1 Features for 3.1 label Jan 23, 2024
shaobo-he-aws added a commit that referenced this pull request May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.1 Features for 3.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants