diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-12-17 10:25:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-17 09:25:15 +0000 |
| commit | ed67220e4b5ae6b3a1bc50f59bd52b5b1dea3a6b (patch) | |
| tree | d27d36e3707e2339af4f55bf514a95e3d0cd3971 /crates/typst-library/src/layout | |
| parent | 51020fcf3cd6fbe62d148d2188b9aaac4445bf63 (diff) | |
Remove deprecated things and compatibility behaviours (#5591)
Diffstat (limited to 'crates/typst-library/src/layout')
| -rw-r--r-- | crates/typst-library/src/layout/measure.rs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/crates/typst-library/src/layout/measure.rs b/crates/typst-library/src/layout/measure.rs index 2fa51b2d..0c6071eb 100644 --- a/crates/typst-library/src/layout/measure.rs +++ b/crates/typst-library/src/layout/measure.rs @@ -1,11 +1,9 @@ use comemo::Tracked; use typst_syntax::Span; -use crate::diag::{warning, At, SourceResult}; +use crate::diag::{At, SourceResult}; use crate::engine::Engine; -use crate::foundations::{ - dict, func, Content, Context, Dict, Resolve, Smart, StyleChain, Styles, -}; +use crate::foundations::{dict, func, Content, Context, Dict, Resolve, Smart}; use crate::introspection::{Locator, LocatorLink}; use crate::layout::{Abs, Axes, Length, Region, Size}; @@ -76,23 +74,9 @@ pub fn measure( height: Smart<Length>, /// The content whose size to measure. content: Content, - /// _Compatibility:_ This argument is deprecated. It only exists for - /// compatibility with Typst 0.10 and lower and shouldn't be used anymore. - #[default] - styles: Option<Styles>, ) -> SourceResult<Dict> { - let styles = match &styles { - Some(styles) => { - engine.sink.warn(warning!( - span, "calling `measure` with a styles argument is deprecated"; - hint: "try removing the styles argument" - )); - StyleChain::new(styles) - } - None => context.styles().at(span)?, - }; - // Create a pod region with the available space. + let styles = context.styles().at(span)?; let pod = Region::new( Axes::new( width.resolve(styles).unwrap_or(Abs::inf()), |
