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

Function merge_paths

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

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

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

Source from the content-addressed store, hash-verified

604
605/// Merge `source` paths into `target`, deduplicating.
606fn merge_paths(target: &mut Vec<PathBuf>, source: &[PathBuf]) {
607 for path in source {
608 if !target.contains(path) {
609 target.push(path.clone());
610 }
611 }
612}
613
614// Tests
615

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