diff options
| author | Marek Barvíř <barvirm@gmail.com> | 2023-04-01 15:53:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-01 15:53:13 +0200 |
| commit | 5e5b1bba510179a1c50f34b3a239f1913e7be78d (patch) | |
| tree | 520058fd817fcd4b5f3e523c5f665fed6916b098 /library/src/math | |
| parent | 9eb6174b22fa4824869fc5e923b96847c2968462 (diff) | |
Needless clone, borrows, casts and lifetimes (#504)
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/ctx.rs | 4 | ||||
| -rw-r--r-- | library/src/math/mod.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/src/math/ctx.rs b/library/src/math/ctx.rs index 904c4333..bad0fe5a 100644 --- a/library/src/math/ctx.rs +++ b/library/src/math/ctx.rs @@ -61,7 +61,7 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> { Self { vt, regions: Regions::one(regions.base(), Axes::splat(false)), - font: &font, + font, ttf: font.ttf(), table, constants, @@ -120,7 +120,7 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> { pub fn layout_content(&mut self, content: &Content) -> SourceResult<Frame> { Ok(content - .layout(&mut self.vt, self.outer.chain(&self.local), self.regions)? + .layout(self.vt, self.outer.chain(&self.local), self.regions)? .into_frame()) } diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 467f91ff..a25c5039 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -297,7 +297,7 @@ impl LayoutMath for Content { } if let Some((elem, styles)) = self.to_styled() { - if TextElem::font_in(ctx.styles().chain(&styles)) + if TextElem::font_in(ctx.styles().chain(styles)) != TextElem::font_in(ctx.styles()) { let frame = ctx.layout_content(self)?; |
