MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / merge_paths

Function merge_paths

atomic-agent/src/event.rs:614–620  ·  view source on GitHub ↗

Merge `source` paths into `target`, deduplicating.

(target: &mut Vec<PathBuf>, source: &[PathBuf])

Source from the content-addressed store, hash-verified

612
613/// Merge `source` paths into `target`, deduplicating.
614fn merge_paths(target: &mut Vec<PathBuf>, source: &[PathBuf]) {
615 for path in source {
616 if !target.contains(path) {
617 target.push(path.clone());
618 }
619 }
620}
621
622// Tests
623

Callers 5

mergeMethod · 0.85
test_merge_paths_dedupFunction · 0.85

Calls 3

containsMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by 4

test_merge_paths_dedupFunction · 0.68