diff --git a/src/review/datastructures.rs b/src/review/datastructures.rs index 8b9632d..ed2d69d 100644 --- a/src/review/datastructures.rs +++ b/src/review/datastructures.rs @@ -23,7 +23,7 @@ pub(super) enum ReviewIntention { #[derive(Debug)] pub(super) struct ReviewsPerBackend { - pub items: Vec<(Box, Vec)>, + items: Vec<(Box, Vec)>, } impl ReviewsPerBackend { @@ -40,6 +40,16 @@ impl ReviewsPerBackend { } } +impl IntoIterator for ReviewsPerBackend { + type Item = (Box, Vec); + + type IntoIter = std::vec::IntoIter<(Box, Vec)>; + + fn into_iter(self) -> Self::IntoIter { + self.items.into_iter() + } +} + pub(super) enum ContinueWithReview { Yes, No, diff --git a/src/review/strategy.rs b/src/review/strategy.rs index ce9b915..d107b34 100644 --- a/src/review/strategy.rs +++ b/src/review/strategy.rs @@ -84,7 +84,7 @@ impl From for Vec { fn from(reviews: ReviewsPerBackend) -> Self { let mut result = vec![]; - for (backend, actions) in reviews.items { + for (backend, actions) in reviews { let (to_delete, assign_group, as_dependency) = divide_actions(actions); result.push(Strategy::new(