diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-25 10:36:31 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-25 12:16:13 +0100 |
| commit | bf5edbbbbb75120d065d1c9587ccfa4eed4fdca1 (patch) | |
| tree | 956af910ab27a8cec0db83171cd3f0b6d0570a60 /library/src/text/shift.rs | |
| parent | 96f72eee6c6b595164c7a0576c407d7a590661db (diff) | |
Tidy up
Diffstat (limited to 'library/src/text/shift.rs')
| -rw-r--r-- | library/src/text/shift.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs index b05f68b7..df8ec5e6 100644 --- a/library/src/text/shift.rs +++ b/library/src/text/shift.rs @@ -43,11 +43,7 @@ impl<const S: ShiftKind> ShiftNode<S> { } impl<const S: ShiftKind> Show for ShiftNode<S> { - fn show( - &self, - world: Tracked<dyn World>, - styles: StyleChain, - ) -> SourceResult<Content> { + fn show(&self, world: Tracked<dyn World>, styles: StyleChain) -> Content { let mut transformed = None; if styles.get(Self::TYPOGRAPHIC) { if let Some(text) = search_text(&self.0, S) { @@ -57,12 +53,12 @@ impl<const S: ShiftKind> Show for ShiftNode<S> { } }; - Ok(transformed.unwrap_or_else(|| { + transformed.unwrap_or_else(|| { let mut map = StyleMap::new(); map.set(TextNode::BASELINE, styles.get(Self::BASELINE)); map.set(TextNode::SIZE, styles.get(Self::SIZE)); self.0.clone().styled_with_map(map) - })) + }) } } |
