Create a context with pre-allocated capacity. # Arguments `header` - The change header `hunk_capacity` - Expected number of hunks
(header: ChangeHeader, hunk_capacity: usize)
| 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 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected