diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-09-19 12:49:36 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-09-19 12:49:36 +0200 |
| commit | 59f67b79c7ff50f0bc9a27373d0fa36d1523e08a (patch) | |
| tree | 4687eea50b231b630563dd14e5de85551f661efb /src/loading/fs.rs | |
| parent | 30be75c6687f1e03cf867d258b3ddba353cc7aa2 (diff) | |
Remove image store
Diffstat (limited to 'src/loading/fs.rs')
| -rw-r--r-- | src/loading/fs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loading/fs.rs b/src/loading/fs.rs index 70ab5e53..55aa967b 100644 --- a/src/loading/fs.rs +++ b/src/loading/fs.rs @@ -6,7 +6,7 @@ use memmap2::Mmap; use same_file::Handle; use walkdir::WalkDir; -use super::{FileHash, Loader}; +use super::{Buffer, FileHash, Loader}; use crate::font::FontInfo; /// Loads fonts and files from the local file system. @@ -130,7 +130,7 @@ impl Loader for FsLoader { } } - fn load(&self, path: &Path) -> io::Result<Vec<u8>> { - fs::read(path) + fn load(&self, path: &Path) -> io::Result<Buffer> { + Ok(fs::read(path)?.into()) } } |
