Skip to content

Commit

Permalink
Fix TinyTodo build error (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-h-kastner-aws authored Dec 15, 2023
1 parent 261b290 commit 08f4280
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cedar-policy/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1387,12 +1387,12 @@ impl<'a> ValidationResult<'a> {
}

/// Get an iterator over the errors found by the validator.
pub fn validation_errors(&self) -> impl Iterator<Item = &ValidationError<'static>> {
pub fn validation_errors<'b>(&self) -> impl Iterator<Item = &ValidationError<'b>> {
self.validation_errors.iter()
}

/// Get an iterator over the warnings found by the validator.
pub fn validation_warnings(&self) -> impl Iterator<Item = &ValidationWarning<'static>> {
pub fn validation_warnings<'b>(&self) -> impl Iterator<Item = &ValidationWarning<'b>> {
self.validation_warnings.iter()
}

Expand Down Expand Up @@ -1632,9 +1632,12 @@ impl<'a> From<cedar_policy_validator::SourceLocation<'a>> for SourceLocation<'st
/// checks are also provided through [`Validator::validate`] which provides more
/// comprehensive error detection, but this function can be used to check for
/// confusable strings without defining a schema.
pub fn confusable_string_checker<'a>(
pub fn confusable_string_checker<'a, 'b>(
templates: impl Iterator<Item = &'a Template> + 'a,
) -> impl Iterator<Item = ValidationWarning<'static>> + 'a {
) -> impl Iterator<Item = ValidationWarning<'b>> + 'a
where
'b: 'a,
{
cedar_policy_validator::confusable_string_checks(templates.map(|t| &t.ast))
.map(std::convert::Into::into)
}
Expand Down

0 comments on commit 08f4280

Please sign in to comment.