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

Method with_capacity

atomic-core/src/record/workflow/assembly/mod.rs:175–187  ·  view source on GitHub ↗

Create a context with pre-allocated capacity. # Arguments `header` - The change header `hunk_capacity` - Expected number of hunks

(header: ChangeHeader, hunk_capacity: usize)

Source from the content-addressed store, hash-verified

173 /// * `header` - The change header
174 /// * `hunk_capacity` - Expected number of hunks
175 pub fn with_capacity(header: ChangeHeader, hunk_capacity: usize) -> Self {
176 Self {
177 header,
178 hunks: Vec::with_capacity(hunk_capacity),
179 span_ops: Vec::new(),
180 file_ops: Vec::new(),
181 dependencies: HashSet::new(),
182 extra_known: HashSet::new(),
183 stats: AssemblyStats::new(),
184 placeholder_branch_base: 0,
185 placeholder_leaf_base: 0,
186 }
187 }
188
189 /// Add a graph_op to the context.
190 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected