From f57c34a7ce7bd09d7c2f2d19f37645ad30493afd Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 15 Jan 2024 15:19:05 +0100 Subject: [PATCH] Remove inline annotations in main crate Inline annotations only have an effect cross-crate and LTO is enabled anyway. Benchmarks don't show any performance difference. Keeping them typst-syntax and typst-timing for now because these have a higher chance of being called cross-crate by crate consumers. --- crates/typst/src/eval/call.rs | 1 - crates/typst/src/foundations/content.rs | 13 ------------- crates/typst/src/foundations/label.rs | 2 -- crates/typst/src/layout/inline/shaping.rs | 7 ------- crates/typst/src/util/scalar.rs | 1 - crates/typst/src/visualize/color.rs | 1 - 6 files changed, 25 deletions(-) diff --git a/crates/typst/src/eval/call.rs b/crates/typst/src/eval/call.rs index 3bdd9a462..379cc9598 100644 --- a/crates/typst/src/eval/call.rs +++ b/crates/typst/src/eval/call.rs @@ -511,7 +511,6 @@ impl<'a> CapturesVisitor<'a> { } /// Capture a variable if it isn't internal. - #[inline] fn capture( &mut self, ident: &str, diff --git a/crates/typst/src/foundations/content.rs b/crates/typst/src/foundations/content.rs index e498c8cb2..a0cb45cfc 100644 --- a/crates/typst/src/foundations/content.rs +++ b/crates/typst/src/foundations/content.rs @@ -72,25 +72,21 @@ pub struct Content(Arc); impl Content { /// Creates a new content from an element. - #[inline] pub fn new(elem: E) -> Self { Self(Arc::new(elem)) } /// Creates a new empty sequence content. - #[inline] pub fn empty() -> Self { Self::new(SequenceElem::default()) } /// Get the element of this content. - #[inline] pub fn elem(&self) -> Element { self.0.dyn_elem() } /// Get the span of the content. - #[inline] pub fn span(&self) -> Span { self.0.span() } @@ -102,7 +98,6 @@ impl Content { } /// Get the label of the content. - #[inline] pub fn label(&self) -> Option