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

Function reserve

atomic-core/src/change/format_v3/graph_fields/decode.rs:44–49  ·  view source on GitHub ↗
(n: usize)

Source from the content-addressed store, hash-verified

42 Ok(out)
43}
44fn reserve<T>(n: usize) -> FormatResult<Vec<T>> {
45 let mut v = Vec::new();
46 v.try_reserve_exact(n)
47 .map_err(|_| FormatError::GraphFieldLimitExceeded)?;
48 Ok(v)
49}
50impl<'a> Decoder<'a> {
51 fn parse(payload: &'a [u8]) -> FormatResult<Self> {
52 if payload.len() > MAX {

Callers 4

parseMethod · 0.70
positionsMethod · 0.70
edgesMethod · 0.70
decodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected