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

Method add_insertion

atomic-core/src/apply/conflict.rs:246–253  ·  view source on GitHub ↗

Add an insertion to this conflict.

(&mut self, node: GraphNode<NodeId>, change: NodeId)

Source from the content-addressed store, hash-verified

244
245 /// Add an insertion to this conflict.
246 pub fn add_insertion(&mut self, node: GraphNode<NodeId>, change: NodeId) {
247 if !self.vertices.contains(&node) {
248 self.vertices.push(node);
249 }
250 if !self.changes.contains(&change) {
251 self.changes.push(change);
252 }
253 }
254
255 /// Get the number of conflicting insertions.
256 pub fn conflict_count(&self) -> usize {

Calls 2

containsMethod · 0.45
pushMethod · 0.45