MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / remove_hidden_selected_from_groups

Function remove_hidden_selected_from_groups

crates/gitql-engine/src/engine.rs:225–246  ·  view source on GitHub ↗
(
    titles: &mut Vec<String>,
    groups: &mut [Group],
    hidden_selections: &[String],
)

Source from the content-addressed store, hash-verified

223}
224
225fn remove_hidden_selected_from_groups(
226 titles: &mut Vec<String>,
227 groups: &mut [Group],
228 hidden_selections: &[String],
229) {
230 let titles_count = titles.len();
231 let mut index_list: Vec<usize> = vec![];
232 for i in (0..titles_count).rev() {
233 if hidden_selections.contains(&titles[i]) {
234 titles.remove(i);
235 index_list.push(i);
236 }
237 }
238
239 for group in groups.iter_mut() {
240 for index_to_delete in index_list.iter() {
241 for row in group.rows.iter_mut() {
242 row.values.remove(*index_to_delete);
243 }
244 }
245 }
246}

Callers 1

evaluate_select_queryFunction · 0.85

Calls 2

containsMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…