Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cedar-policy-core/src/ast/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,13 @@ impl Entity {
pub(crate) fn add_ancestor(&mut self, uid: EntityUID) {
self.ancestors.insert(uid);
}

/// Add a set of ancestors to this `Entity`.
/// TODO why is `add_ancestor` pub(crate) instead of pub, and should this be too?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Question here on if this can be public

pub fn add_ancestors(&mut self, ancestors: HashSet<EntityUID>) {
self.ancestors.extend(ancestors);
}

/// Mark the given `UID` as an ancestor of this `Entity`
#[cfg(fuzzing)]
pub fn add_ancestor(&mut self, uid: EntityUID) {
Expand Down
Loading