Skip to content

Commit

Permalink
Remove duplicated method (#1205)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Eline <[email protected]>
  • Loading branch information
aaronjeline authored Sep 16, 2024
1 parent a15e77e commit 85ff652
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions cedar-policy-core/src/ast/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,6 @@ impl Entity {
})
}

/// Create a new `Entity` with this UID, ancestors, and an empty set of attributes
///
/// Since there are no attributes, this method does not error, and returns `Self` instead of `Result<Self>`
pub fn new_empty_attrs(uid: EntityUID, ancestors: HashSet<EntityUID>) -> Self {
Self::new_with_attr_partial_value(uid, HashMap::new(), ancestors)
}

/// Create a new `Entity` with this UID, attributes, and ancestors.
///
/// Unlike in `Entity::new()`, in this constructor, attributes are expressed
Expand Down
10 changes: 0 additions & 10 deletions cedar-policy/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ impl Entity {
)?))
}

/// Create a new `Entity` with this Uid, parents, and no attributes.
/// This is the same as `Self::new` except the attributes are empty, and therefore it can
/// return `Self` instead of `Result<Self>`
pub fn new_empty_attrs(uid: EntityUid, parents: HashSet<EntityUid>) -> Self {
Self(ast::Entity::new_empty_attrs(
uid.into(),
parents.into_iter().map(EntityUid::into).collect(),
))
}

/// Create a new `Entity` with no attributes.
///
/// Unlike [`Entity::new()`], this constructor cannot error.
Expand Down

0 comments on commit 85ff652

Please sign in to comment.