From 9ff961520849b3352a7f7266cceb3d1d9886d0c7 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 25 Sep 2023 12:38:57 +0200 Subject: [PATCH] Fix warning when compiling without embedded fonts --- crates/typst-cli/src/fonts.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/typst-cli/src/fonts.rs b/crates/typst-cli/src/fonts.rs index 6b4fc2fc9..9eeb15e22 100644 --- a/crates/typst-cli/src/fonts.rs +++ b/crates/typst-cli/src/fonts.rs @@ -5,7 +5,6 @@ use std::path::{Path, PathBuf}; use memmap2::Mmap; use typst::diag::StrResult; -use typst::eval::Bytes; use typst::font::{Font, FontBook, FontInfo, FontVariant}; use walkdir::WalkDir; @@ -82,7 +81,7 @@ impl FontSearcher { #[cfg(feature = "embed-fonts")] fn add_embedded(&mut self) { let mut process = |bytes: &'static [u8]| { - let buffer = Bytes::from_static(bytes); + let buffer = typst::eval::Bytes::from_static(bytes); for (i, font) in Font::iter(buffer).enumerate() { self.book.push(font.info().clone()); self.fonts.push(FontSlot {