From e9f58f5fd0b6402f02726a40b9d2ec3451fc39fc Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 14 Nov 2026 04:37:22 +0000 Subject: [PATCH] Build: restore designcraft_format::write for recovery; render decodes without naming the image crate (cherry picked from commit 078f5994c4c2f4fcbb7f1838cecae7b0a1ca195c) --- crates/format/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/format/src/lib.rs b/crates/format/src/lib.rs index bcfacd976..a05a8baa7 100644 --- a/crates/format/src/lib.rs +++ b/crates/format/src/lib.rs @@ -36,6 +36,16 @@ pub fn save_with_preview(doc: &Document, preview: Option<&[u8]>) -> Result(out: &mut W, doc: &Document, preview: Option<&[u8]>) -> Result<(), FormatError> { + let bytes = save_with_preview(doc, preview)?; + for chunk in bytes.chunks(1 << 20) { + out.write_all(chunk).map_err(|e| FormatError::Io(e.to_string()))?; + } + Ok(()) +} + /// Required native format version for a document. Kept for app-side compatibility; inference is /// performed by the shared codec over the serialized neutral document schema. #[cfg(test)]