MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / dedup_in_order

Function dedup_in_order

codegraph-kernel/src/cfnptr.rs:1129–1138  ·  view source on GitHub ↗
(v: Vec<String>)

Source from the content-addressed store, hash-verified

1127 String::from_utf8_lossy(bytes).into_owned()
1128}
1129
1130fn dedup_in_order(v: Vec<String>) -> Vec<String> {
1131 let mut seen = std::collections::HashSet::new();
1132 let mut out = Vec::with_capacity(v.len());
1133 for x in v {
1134 if seen.insert(x.clone()) {
1135 out.push(x);
1136 }
1137 }
1138 out
1139}
1140
1141/// Line start offsets (byte offset of each line's first byte).

Callers 1

scan_fileFunction · 0.85

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected