refactor reviewsperbackend
This commit is contained in:
@@ -23,7 +23,7 @@ pub(super) enum ReviewIntention {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(super) struct ReviewsPerBackend {
|
||||
pub items: Vec<(Box<dyn Backend>, Vec<ReviewAction>)>,
|
||||
items: Vec<(Box<dyn Backend>, Vec<ReviewAction>)>,
|
||||
}
|
||||
|
||||
impl ReviewsPerBackend {
|
||||
@@ -40,6 +40,16 @@ impl ReviewsPerBackend {
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoIterator for ReviewsPerBackend {
|
||||
type Item = (Box<dyn Backend>, Vec<ReviewAction>);
|
||||
|
||||
type IntoIter = std::vec::IntoIter<(Box<dyn Backend>, Vec<ReviewAction>)>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.items.into_iter()
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) enum ContinueWithReview {
|
||||
Yes,
|
||||
No,
|
||||
|
||||
@@ -84,7 +84,7 @@ impl From<ReviewsPerBackend> for Vec<Strategy> {
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user