diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-02-04 21:36:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-02-04 21:36:29 +0100 |
| commit | 751812f45141a7b2022d0dba138457f3c21950b0 (patch) | |
| tree | 8f5125f5c475313c460f4a98ec174c11cb0e9c02 /src/lib.rs | |
| parent | e63ce52ae0d929506a1fa238477f039d14d53813 (diff) | |
Serialize layouts with serde ðŸ”
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -24,7 +24,8 @@ use async_trait::async_trait; use smallvec::smallvec; use toddle::{Font, OwnedData}; -use toddle::query::{FontLoader, FontProvider, SharedFontLoader, FontDescriptor}; +use toddle::query::{FontLoader, SharedFontLoader}; +use toddle::query::{FontProvider, FontIndex, FontDescriptor}; use crate::error::Error; use crate::layout::MultiLayout; @@ -223,8 +224,8 @@ where P: FontProvider, P::Error: Debug + 'static { type Data = P::Data; type Error = Box<dyn Debug>; - async fn load(&self, index: usize, variant: usize) -> Result<Font<P::Data>, Self::Error> { - self.provider.load(index, variant).await + async fn load(&self, index: FontIndex) -> Result<Font<P::Data>, Self::Error> { + self.provider.load(index).await .map_err(|d| Box::new(d) as Box<dyn Debug>) } } |
