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

Function owned

atomic-core/src/change/format_v3/graph_fields/decode.rs:37–43  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

35 Ok(v)
36}
37fn owned(value: &str) -> FormatResult<String> {
38 let mut out = String::new();
39 out.try_reserve(value.len())
40 .map_err(|_| FormatError::GraphFieldLimitExceeded)?;
41 out.push_str(value);
42 Ok(out)
43}
44fn reserve<T>(n: usize) -> FormatResult<Vec<T>> {
45 let mut v = Vec::new();
46 v.try_reserve_exact(n)

Callers 2

pathMethod · 0.70
decodeFunction · 0.70

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected