diff --git a/lib/src/files.rs b/lib/src/files.rs index 5a6bb5551..3730305c9 100644 --- a/lib/src/files.rs +++ b/lib/src/files.rs @@ -192,12 +192,24 @@ impl Debug for MergeHunk { } } -#[derive(Debug, PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone)] pub enum MergeResult { Resolved(Vec), Conflict(Vec), } +impl Debug for MergeResult { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { + match self { + MergeResult::Resolved(data) => f + .debug_tuple("Resolved") + .field(&String::from_utf8_lossy(data)) + .finish(), + MergeResult::Conflict(hunks) => f.debug_tuple("Conflict").field(hunks).finish(), + } + } +} + /// A region where the base and two sides match. #[derive(Debug, PartialEq, Eq, Clone)] struct SyncRegion {