Record a conflict with the given type.
(&mut self, conflict_type: FileConflictType, id: u32, hash: Option<&Hash>)
| 326 | |
| 327 | /// Record a conflict with the given type. |
| 328 | fn record_conflict(&mut self, conflict_type: FileConflictType, id: u32, hash: Option<&Hash>) { |
| 329 | let mut conflict = FileConflict::new(self.path.clone(), conflict_type) |
| 330 | .at_line(self.line) |
| 331 | .with_id(id); |
| 332 | |
| 333 | if let Some(h) = hash { |
| 334 | conflict = conflict.with_change(*h); |
| 335 | } |
| 336 | |
| 337 | self.conflicts.push(conflict); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | /// Count the number of digits in a u32. |
no test coverage detected