From 181f756a9e8f7b664101058fe91e36b3858c2d02 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 30 Aug 2020 22:18:55 +0200 Subject: =?UTF-8?q?Format=20everything=20with=20rustfmt!=20=F0=9F=92=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib.rs | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 30196034..1436dae1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,24 +95,22 @@ impl Typesetter { use crate::layout::prelude::*; let margins = self.style.page.margins(); - layout( - &tree, - LayoutContext { - loader: &self.loader, - scope: &self.std, - style: &self.style, - base: self.style.page.size.unpadded(margins), - spaces: vec![LayoutSpace { - size: self.style.page.size, - padding: margins, - expansion: LayoutExpansion::new(true, true), - }], - repeat: true, - axes: LayoutAxes::new(LTR, TTB), - align: LayoutAlign::new(Start, Start), - root: true, - }, - ).await + layout(&tree, LayoutContext { + loader: &self.loader, + scope: &self.std, + style: &self.style, + base: self.style.page.size.unpadded(margins), + spaces: vec![LayoutSpace { + size: self.style.page.size, + padding: margins, + expansion: LayoutExpansion::new(true, true), + }], + repeat: true, + axes: LayoutAxes::new(LTR, TTB), + align: LayoutAlign::new(Start, Start), + root: true, + }) + .await } /// Process source code directly into a collection of layouts. @@ -177,10 +175,7 @@ pub struct Feedback { impl Feedback { /// Create a new feedback instance without errors and decos. pub fn new() -> Self { - Self { - diagnostics: vec![], - decorations: vec![], - } + Self { diagnostics: vec![], decorations: vec![] } } /// Merged two feedbacks into one. -- cgit v1.2.3