Skip to content

Commit

Permalink
fix check on intersection
Browse files Browse the repository at this point in the history
  • Loading branch information
k88hudson-cfa committed Nov 30, 2024
1 parent db0fbc6 commit 445c911
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/people.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,12 +888,13 @@ fn process_indices(
}

for (display, people) in lookup.values() {
let intersect = !property_names.is_empty();
property_names.push(display.clone());

let matches = if property_names.is_empty() {
people
} else {
let matches = if intersect {
&current_matches.intersection(people).copied().collect()
} else {
people
};

process_indices(context, rest_indices, property_names, matches, print_fn);
Expand Down

0 comments on commit 445c911

Please sign in to comment.