diff --git a/crates/format/src/lib.rs b/crates/format/src/lib.rs index e038a6e64..d42c3d25f 100644 --- a/crates/format/src/lib.rs +++ b/crates/format/src/lib.rs @@ -59,16 +59,6 @@ pub fn write(out: &mut W, doc: &Document, pre craft_designcraft_format::write_to(out, &compact, concat!("DesignCraft ", env!("CARGO_PKG_VERSION")), preview, &assets, &proxies) } -/// [`save_with_preview`] into `out`, in chunks, so a writer that stops on cancellation stops the -/// write at its next chunk. -pub fn write(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)]