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

Method take_conflicts

atomic-core/src/output/repo/writer.rs:237–239  ·  view source on GitHub ↗

Take ownership of the detected conflicts. After calling this, the internal conflict list is empty. # Example ```rust use atomic_core::output::repo::ConflictWriter; use atomic_core::types::{NodeId, Position, ChangePosition}; let mut buffer = Vec::new(); let pos = Position::new(NodeId::ROOT, ChangePosition::new(0)); let mut writer = ConflictWriter::new(&mut buffer, "test.rs", pos); // ... write

(&mut self)

Source from the content-addressed store, hash-verified

235 /// assert!(writer.conflicts().is_empty());
236 /// ```
237 pub fn take_conflicts(&mut self) -> Vec<FileConflict> {
238 std::mem::take(&mut self.conflicts)
239 }
240
241 /// Check if any conflicts were detected.
242 pub fn has_conflicts(&self) -> bool {

Callers 1

test_take_conflictsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_take_conflictsFunction · 0.64