diff options
Diffstat (limited to 'docs/src')
| -rw-r--r-- | docs/src/html.rs | 2 | ||||
| -rw-r--r-- | docs/src/lib.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/src/html.rs b/docs/src/html.rs index a1206032..4eb3954c 100644 --- a/docs/src/html.rs +++ b/docs/src/html.rs @@ -486,7 +486,7 @@ impl World for DocWorld { fn file(&self, id: FileId) -> FileResult<Bytes> { assert!(id.package().is_none()); - Ok(Bytes::from_static( + Ok(Bytes::new( typst_dev_assets::get_by_name( &id.vpath().as_rootless_path().to_string_lossy(), ) diff --git a/docs/src/lib.rs b/docs/src/lib.rs index e9279971..2751500e 100644 --- a/docs/src/lib.rs +++ b/docs/src/lib.rs @@ -78,7 +78,7 @@ static LIBRARY: LazyLock<LazyHash<Library>> = LazyLock::new(|| { static FONTS: LazyLock<(LazyHash<FontBook>, Vec<Font>)> = LazyLock::new(|| { let fonts: Vec<_> = typst_assets::fonts() .chain(typst_dev_assets::fonts()) - .flat_map(|data| Font::iter(Bytes::from_static(data))) + .flat_map(|data| Font::iter(Bytes::new(data))) .collect(); let book = FontBook::from_fonts(&fonts); (LazyHash::new(book), fonts) |
