Skip to content

Conversation

aaronjeline
Copy link

Description of changes

  • Adds Entity::new_without_attrs that can't error
  • Entity is now Hash, which is very useful as we require that entity collections lack duplicates
  • Added documentation to methods on Entities clarifying when errors are returned

Issue #, if available

#1184

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 formal model or DRT infrastructure.

@aaronjeline aaronjeline linked an issue Sep 9, 2024 that may be closed by this pull request
2 tasks
@aaronjeline aaronjeline force-pushed the 1184-some-usability-improvements branch from 47f507f to f759fef Compare September 10, 2024 14:01
/// error if attributes have the wrong types (e.g., string instead of
/// integer), or if required attributes are missing or superfluous
/// attributes are provided.
/// # Errors
Copy link
Contributor

Choose a reason for hiding this comment

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

We could consider enabling the missing_error_doc lint if we believe this sort of documentation is valuable.

Copy link
Contributor

@cdisselkoen cdisselkoen left a comment

Choose a reason for hiding this comment

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

Looks good overall, one comment about panic safety

Co-authored-by: John Kastner <[email protected]>
Co-authored-by: Craig Disselkoen <[email protected]>
Signed-off-by: Aaron Eline <[email protected]>
@aaronjeline aaronjeline force-pushed the 1184-some-usability-improvements branch from e1058bf to f6b153e Compare September 10, 2024 15:07
@aaronjeline aaronjeline merged commit 20e0195 into main Sep 10, 2024
19 checks passed
@aaronjeline aaronjeline deleted the 1184-some-usability-improvements branch September 10, 2024 17:42
aaronjeline pushed a commit that referenced this pull request Sep 10, 2024
Signed-off-by: Aaron Eline <[email protected]>
Co-authored-by: John Kastner <[email protected]>
Co-authored-by: Craig Disselkoen <[email protected]>
@aaronjeline aaronjeline mentioned this pull request Sep 10, 2024
3 tasks
khieta pushed a commit that referenced this pull request Sep 10, 2024
Signed-off-by: Aaron Eline <[email protected]>
Co-authored-by: John Kastner <[email protected]>
Co-authored-by: Craig Disselkoen <[email protected]>
@khieta khieta mentioned this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some usability improvements
3 participants