summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-12-17 10:25:15 +0100
committerGitHub <noreply@github.com>2024-12-17 09:25:15 +0000
commited67220e4b5ae6b3a1bc50f59bd52b5b1dea3a6b (patch)
treed27d36e3707e2339af4f55bf514a95e3d0cd3971 /crates/typst-library/src/layout
parent51020fcf3cd6fbe62d148d2188b9aaac4445bf63 (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.rs22
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()),