From 08f4280a925420182fe394c3895555e2b7d9290f Mon Sep 17 00:00:00 2001 From: John Kastner <130772734+john-h-kastner-aws@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:04:59 -0500 Subject: [PATCH] Fix TinyTodo build error (#514) --- cedar-policy/src/api.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cedar-policy/src/api.rs b/cedar-policy/src/api.rs index 1f626c87e..b455ff0b5 100644 --- a/cedar-policy/src/api.rs +++ b/cedar-policy/src/api.rs @@ -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> { + pub fn validation_errors<'b>(&self) -> impl Iterator> { self.validation_errors.iter() } /// Get an iterator over the warnings found by the validator. - pub fn validation_warnings(&self) -> impl Iterator> { + pub fn validation_warnings<'b>(&self) -> impl Iterator> { self.validation_warnings.iter() } @@ -1632,9 +1632,12 @@ impl<'a> From> 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 + 'a, -) -> impl Iterator> + 'a { +) -> impl Iterator> + 'a +where + 'b: 'a, +{ cedar_policy_validator::confusable_string_checks(templates.map(|t| &t.ast)) .map(std::convert::Into::into) }