diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-25 12:38:57 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-25 12:38:57 +0200 |
| commit | 9ff961520849b3352a7f7266cceb3d1d9886d0c7 (patch) | |
| tree | 654e87db7090ea2958db08087769c1e166aedf57 | |
| parent | 72f4c543cced0741f3349896cc96bda90a0c69ac (diff) | |
Fix warning when compiling without embedded fonts
| -rw-r--r-- | crates/typst-cli/src/fonts.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/typst-cli/src/fonts.rs b/crates/typst-cli/src/fonts.rs index 6b4fc2fc..9eeb15e2 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 { |
