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

Function dedup_in_order

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

Source from the content-addressed store, hash-verified

1145 String::from_utf8_lossy(bytes).into_owned()
1146}
1147
1148fn dedup_in_order(v: Vec<String>) -> Vec<String> {
1149 let mut seen = std::collections::HashSet::new();
1150 let mut out = Vec::with_capacity(v.len());
1151 for x in v {
1152 if seen.insert(x.clone()) {
1153 out.push(x);
1154 }
1155 }
1156 out
1157}
1158
1159/// 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