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

Method new

atomic-core/src/output/repo/conflict.rs:262–270  ·  view source on GitHub ↗

Create a new file conflict. # Arguments `path` - Path to the file containing the conflict `conflict_type` - The type of conflict detected # Example ```rust use atomic_core::output::repo::{FileConflict, FileConflictType}; let conflict = FileConflict::new("src/main.rs", FileConflictType::Order); assert_eq!(conflict.path, "src/main.rs"); assert!(conflict.changes.is_empty()); ```

(path: impl Into<String>, conflict_type: FileConflictType)

Source from the content-addressed store, hash-verified

260 /// assert!(conflict.changes.is_empty());
261 /// ```
262 pub fn new(path: impl Into<String>, conflict_type: FileConflictType) -> Self {
263 Self {
264 path: path.into(),
265 conflict_type,
266 changes: Vec::new(),
267 line: None,
268 id: None,
269 }
270 }
271
272 /// Add a single change hash to this conflict.
273 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected