From bf5edbbbbb75120d065d1c9587ccfa4eed4fdca1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 25 Nov 2022 10:36:31 +0100 Subject: Tidy up --- library/src/structure/heading.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'library/src/structure/heading.rs') diff --git a/library/src/structure/heading.rs b/library/src/structure/heading.rs index cf732a4e..063f3c97 100644 --- a/library/src/structure/heading.rs +++ b/library/src/structure/heading.rs @@ -34,18 +34,13 @@ impl HeadingNode { } impl Show for HeadingNode { - fn show(&self, _: Tracked, _: StyleChain) -> SourceResult { - Ok(BlockNode(self.body.clone()).pack()) + fn show(&self, _: Tracked, _: StyleChain) -> Content { + BlockNode(self.body.clone()).pack() } } impl Finalize for HeadingNode { - fn finalize( - &self, - _: Tracked, - _: StyleChain, - realized: Content, - ) -> SourceResult { + fn finalize(&self, realized: Content) -> Content { let scale = match self.level.get() { 1 => 1.4, 2 => 1.2, @@ -61,7 +56,6 @@ impl Finalize for HeadingNode { map.set(TextNode::WEIGHT, FontWeight::BOLD); map.set(BlockNode::ABOVE, VNode::block_around(above.into())); map.set(BlockNode::BELOW, VNode::block_around(below.into())); - - Ok(realized.styled_with_map(map)) + realized.styled_with_map(map) } } -- cgit v1.2.3