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

Function merge_paths

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

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

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

Source from the content-addressed store, hash-verified

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

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