@@ -74,7 +74,7 @@ impl Validator {
74
74
Some ( ValidationError :: unspecified_entity (
75
75
euid. loc ( ) . cloned ( ) ,
76
76
template. id ( ) . clone ( ) ,
77
- euid. eid ( ) . to_string ( ) ,
77
+ euid. eid ( ) . clone ( ) ,
78
78
) )
79
79
}
80
80
cedar_policy_core:: ast:: EntityType :: Specified ( _) => None ,
@@ -102,7 +102,7 @@ impl Validator {
102
102
ast:: EntityType :: Unspecified => Some ( ValidationError :: unspecified_entity (
103
103
euid. loc ( ) . cloned ( ) ,
104
104
template. id ( ) . clone ( ) ,
105
- euid. eid ( ) . to_string ( ) ,
105
+ euid. eid ( ) . clone ( ) ,
106
106
) ) ,
107
107
ast:: EntityType :: Specified ( name) => {
108
108
let is_known_action_entity_id = self . schema . is_known_action_id ( euid) ;
@@ -146,7 +146,7 @@ impl Validator {
146
146
Some ( ValidationError :: unspecified_entity (
147
147
None ,
148
148
policy_id. clone ( ) ,
149
- euid. eid ( ) . to_string ( ) ,
149
+ euid. eid ( ) . clone ( ) ,
150
150
) )
151
151
}
152
152
cedar_policy_core:: ast:: EntityType :: Specified ( name) => {
@@ -1572,7 +1572,8 @@ mod test {
1572
1572
assert_eq ! ( 1 , notes. len( ) ) ;
1573
1573
assert_matches ! ( notes. first( ) ,
1574
1574
Some ( ValidationError :: UnspecifiedEntity ( UnspecifiedEntity { entity_id, .. } ) ) => {
1575
- assert_eq!( "foo" , entity_id) ;
1575
+ let eid: & str = entity_id. as_ref( ) ;
1576
+ assert_eq!( "foo" , eid) ;
1576
1577
}
1577
1578
) ;
1578
1579
@@ -1591,7 +1592,8 @@ mod test {
1591
1592
assert_eq ! ( 1 , notes. len( ) ) ;
1592
1593
assert_matches ! ( notes. first( ) ,
1593
1594
Some ( ValidationError :: UnspecifiedEntity ( UnspecifiedEntity { entity_id, .. } ) ) => {
1594
- assert_eq!( "foo" , entity_id) ;
1595
+ let eid: & str = entity_id. as_ref( ) ;
1596
+ assert_eq!( "foo" , eid) ;
1595
1597
}
1596
1598
) ;
1597
1599
@@ -1622,7 +1624,8 @@ mod test {
1622
1624
assert_eq ! ( 1 , notes. len( ) ) ;
1623
1625
assert_matches ! ( notes. first( ) ,
1624
1626
Some ( ValidationError :: UnspecifiedEntity ( UnspecifiedEntity { entity_id, .. } ) ) => {
1625
- assert_eq!( "foo" , entity_id) ;
1627
+ let eid: & str = entity_id. as_ref( ) ;
1628
+ assert_eq!( "foo" , eid) ;
1626
1629
}
1627
1630
) ;
1628
1631
0 commit comments