summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/loading/cbor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/loading/cbor.rs')
-rw-r--r--crates/typst-library/src/loading/cbor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-library/src/loading/cbor.rs b/crates/typst-library/src/loading/cbor.rs
index 977059c3..a03e5c99 100644
--- a/crates/typst-library/src/loading/cbor.rs
+++ b/crates/typst-library/src/loading/cbor.rs
@@ -55,7 +55,7 @@ impl cbor {
let Spanned { v: value, span } = value;
let mut res = Vec::new();
ciborium::into_writer(&value, &mut res)
- .map(|_| res.into())
+ .map(|_| Bytes::new(res))
.map_err(|err| eco_format!("failed to encode value as CBOR ({err})"))
.at(span)
}