Skip to content

Commit

Permalink
better lifetime bound for some returned values (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdisselkoen authored Sep 8, 2023
1 parent e65bb66 commit da1de93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cedar-policy-core/src/ast/restricted_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl<'a> From<BorrowedRestrictedExpr<'a>> for &'a Expr {
}

impl<'a> AsRef<Expr> for BorrowedRestrictedExpr<'a> {
fn as_ref(&self) -> &Expr {
fn as_ref(&self) -> &'a Expr {
self.0
}
}
Expand All @@ -279,8 +279,8 @@ impl RestrictedExpr {

impl<'a> Deref for BorrowedRestrictedExpr<'a> {
type Target = Expr;
fn deref(&self) -> &Expr {
self.as_ref()
fn deref(&self) -> &'a Expr {
self.0
}
}

Expand Down

0 comments on commit da1de93

Please sign in to comment.