Skip to content

Commit 8ec7d35

Browse files
committed
style: rustfmt register_font in text_engine
1 parent abdb50e commit 8ec7d35

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/text_engine.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,16 @@ impl TextEngine {
8181
/// [`FontContext::new`] finds nothing to resolve `monospace` against.
8282
pub fn register_font(&mut self, data: Vec<u8>) -> Option<String> {
8383
let blob = Blob::new(Arc::new(data) as Arc<dyn AsRef<[u8]> + Send + Sync>);
84-
let (family_id, _) = self.fcx.collection.register_fonts(blob, None).into_iter().next()?;
85-
self.fcx.collection.family_name(family_id).map(str::to_string)
84+
let (family_id, _) = self
85+
.fcx
86+
.collection
87+
.register_fonts(blob, None)
88+
.into_iter()
89+
.next()?;
90+
self.fcx
91+
.collection
92+
.family_name(family_id)
93+
.map(str::to_string)
8694
}
8795

8896
/// The default font for a line: the configured family with a monospace fallback, or

0 commit comments

Comments
 (0)