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

Function merge_paths

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

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

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

Source from the content-addressed store, hash-verified

995
996/// Merge `source` paths into `target`, deduplicating.
997fn merge_paths(target: &mut Vec<PathBuf>, source: &[PathBuf]) {
998 for path in source {
999 if !target.contains(path) {
1000 target.push(path.clone());
1001 }
1002 }
1003}
1004
1005// Tests
1006

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