summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-08-30 22:18:55 +0200
committerLaurenz <laurmaedje@gmail.com>2020-08-30 22:18:55 +0200
commit181f756a9e8f7b664101058fe91e36b3858c2d02 (patch)
tree542e7c694e91d8cc91fa97a328e9bda0567db679 /src/lib.rs
parent0d44cf532136f3ba8e34d6f967f9e844cfb9c3f0 (diff)
Format everything with rustfmt! 💚
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs39
1 files changed, 17 insertions, 22 deletions
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.