diff --git a/canrun/src/core/query.rs b/canrun/src/core/query.rs index f3425b2..8619e51 100644 --- a/canrun/src/core/query.rs +++ b/canrun/src/core/query.rs @@ -57,11 +57,11 @@ pub trait Query<'a> { assert_eq!(result, vec![1]) ``` */ - fn query(self, query: Q) -> Box + 'a>; + fn query(self, query: Q) -> impl Iterator; } impl<'a, S: StateIterator + 'a> Query<'a> for S { - fn query(self, query: Q) -> Box + 'a> { + fn query(self, query: Q) -> impl Iterator { Box::new( self.into_states() .filter_map(move |s| query.reify_in(&s.ready()?)),