summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-02-04 21:36:29 +0100
committerLaurenz <laurmaedje@gmail.com>2020-02-04 21:36:29 +0100
commit751812f45141a7b2022d0dba138457f3c21950b0 (patch)
tree8f5125f5c475313c460f4a98ec174c11cb0e9c02 /src/lib.rs
parente63ce52ae0d929506a1fa238477f039d14d53813 (diff)
Serialize layouts with serde 🔠
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b74837fe..7136b2bd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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>)
}
}