Update the unique branches according the new coverage
(&mut self, coming_branches: &HashMap<String, Vec<Branch>>)
| 207 | |
| 208 | // Update the unique branches according the new coverage |
| 209 | pub fn update_unique_branches(&mut self, coming_branches: &HashMap<String, Vec<Branch>>) { |
| 210 | for unique_branch in self.quality.unique_branches.iter_mut() { |
| 211 | let (func, branches) = unique_branch; |
| 212 | if let Some(coming_func_branches) = coming_branches.get(func) { |
| 213 | branches.retain(|branch| !coming_func_branches.contains(branch)); |
| 214 | } |
| 215 | } |
| 216 | self.quality |
| 217 | .unique_branches |
| 218 | .retain(|_, value| !value.is_empty()); |
| 219 | } |
| 220 | |
| 221 | pub fn set_unique_branches(&mut self, unique_branches: HashMap<String, Vec<Branch>>) { |
| 222 | self.quality.unique_branches = unique_branches |
no test coverage detected