MCPcopy Create free account
hub / github.com/PerroEngine/Perro / csv_promotes_to_buf

Function csv_promotes_to_buf

perro_source/core/perro_csv/src/lib.rs:1131–1141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1129 values: HashMap::with_capacity(row_capacity.saturating_mul(2).max(64)),
1130 }
1131 }
1132
1133 fn intern(&mut self, value: &str) -> &'static str {
1134 if let Some(existing) = self.values.get(value).copied() {
1135 return existing;
1136 }
1137 let leaked = Box::leak(value.to_string().into_boxed_str());
1138 self.values.insert(leaked, leaked);
1139 leaked
1140 }
1141}
1142
1143fn leak_cells<'a>(
1144 values: impl Iterator<Item = &'a str>,

Callers

nothing calls this directly

Calls 3

parse_csv_staticFunction · 0.85
set_by_headerMethod · 0.80
to_bufMethod · 0.45

Tested by

no test coverage detected