(&self, other: &Filters)
| 73 | } |
| 74 | |
| 75 | pub fn difference(&self, other: &Filters) -> Filters { |
| 76 | let other_indices_set: HashSet<_> = other.current_indices.iter().collect(); |
| 77 | let difference_indices = self |
| 78 | .current_indices |
| 79 | .iter() |
| 80 | .filter(|&x| !other_indices_set.contains(x)) |
| 81 | .cloned() |
| 82 | .collect::<Vec<_>>(); |
| 83 | |
| 84 | let other_ids_set: HashSet<_> = other.current_ids.iter().collect(); |
| 85 | let difference_ids = self |
| 86 | .current_ids |
| 87 | .iter() |
| 88 | .filter(|&x| !other_ids_set.contains(x)) |
| 89 | .cloned() |
| 90 | .collect::<Vec<_>>(); |
| 91 | |
| 92 | Filters::new(difference_indices, difference_ids) |
| 93 | } |
| 94 | |
| 95 | pub fn is_subset(&self, other: &Filters) -> bool { |
| 96 | self.current_indices |
nothing calls this directly
no outgoing calls
no test coverage detected