959e60a7
Propagate write errors in patch_log_to_writer
a73x 2026-03-21 19:14
Replace .ok() calls on writeln! with ? operator so write failures are properly surfaced to callers instead of being silently swallowed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
diff --git a/src/patch.rs b/src/patch.rs index 2ed819b..f143965 100644 --- a/src/patch.rs +++ b/src/patch.rs @@ -605,7 +605,7 @@ pub fn patch_log_to_writer( writer: &mut dyn std::io::Write, ) -> Result<(), Error> { if patch.revisions.is_empty() { writeln!(writer, "No revisions recorded.").ok(); writeln!(writer, "No revisions recorded.")?; return Ok(()); } @@ -640,7 +640,7 @@ pub fn patch_log_to_writer( writer, "Revision {} {} {}{}{}{}", rev.number, short_oid, rev.timestamp, label, file_summary, body_display ).ok(); )?; } Ok(()) }