diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:29:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 17:29:01 +0200 |
| commit | 5243878d810d4817c81acc9ae346d46757fcf602 (patch) | |
| tree | 4a8be00ab7262030a6ba8c6638b969a03ac1d9b5 /src/layout/text.rs | |
| parent | 38157b0e0cbab22dc3f5fa5cc66d9b673a18a55b (diff) | |
Less vecs in layouting ⚡
Diffstat (limited to 'src/layout/text.rs')
| -rw-r--r-- | src/layout/text.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/layout/text.rs b/src/layout/text.rs index 5e047069..31ae19cd 100644 --- a/src/layout/text.rs +++ b/src/layout/text.rs @@ -24,9 +24,9 @@ pub struct Text { } impl Layout for Text { - fn layout(&self, ctx: &mut LayoutContext, _: &Areas) -> Vec<Layouted> { + fn layout(&self, ctx: &mut LayoutContext, _: &Areas) -> Layouted { let mut loader = ctx.loader.borrow_mut(); - vec![Layouted::Boxed( + Layouted::Boxed( shaping::shape( &mut loader, &self.text, @@ -36,7 +36,7 @@ impl Layout for Text { self.variant, ), self.aligns, - )] + ) } } |
