From 85ff65276cacaf801ed091ce021ae835590b176c Mon Sep 17 00:00:00 2001 From: Aaron Eline Date: Mon, 16 Sep 2024 10:52:01 -0400 Subject: [PATCH] Remove duplicated method (#1205) Signed-off-by: Aaron Eline --- cedar-policy-core/src/ast/entity.rs | 7 ------- cedar-policy/src/api.rs | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/cedar-policy-core/src/ast/entity.rs b/cedar-policy-core/src/ast/entity.rs index dd62d89c4..c33f5d8dc 100644 --- a/cedar-policy-core/src/ast/entity.rs +++ b/cedar-policy-core/src/ast/entity.rs @@ -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` - pub fn new_empty_attrs(uid: EntityUID, ancestors: HashSet) -> 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 diff --git a/cedar-policy/src/api.rs b/cedar-policy/src/api.rs index 0dce5f7d7..2e4cab2fb 100644 --- a/cedar-policy/src/api.rs +++ b/cedar-policy/src/api.rs @@ -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` - pub fn new_empty_attrs(uid: EntityUid, parents: HashSet) -> 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.