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

Function diff_changes_files_count

src/gitql/functions/diffs.rs:240–250  ·  view source on GitHub ↗
(values: &[Box<dyn Value>])

Source from the content-addressed store, hash-verified

238}
239
240fn diff_changes_files_count(values: &[Box<dyn Value>]) -> Box<dyn Value> {
241 if let Some(changes) = values[0].as_any().downcast_ref::<DiffChangesValue>() {
242 let mut unique_files: HashSet<&String> = HashSet::new();
243 for change in changes.changes.iter() {
244 unique_files.insert(&change.location);
245 }
246 let value = unique_files.len() as i64;
247 return Box::new(IntValue::new(value));
248 }
249 Box::new(IntValue::new_zero())
250}
251
252fn diff_changes_contains_file(values: &[Box<dyn Value>]) -> Box<dyn Value> {
253 if let Some(changes) = values[0].as_any().downcast_ref::<DiffChangesValue>() {

Callers

nothing calls this directly

Calls 2

as_anyMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…