summaryrefslogtreecommitdiff
path: root/crates/typst-layout/src/inline/linebreak.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-layout/src/inline/linebreak.rs')
-rw-r--r--crates/typst-layout/src/inline/linebreak.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/typst-layout/src/inline/linebreak.rs b/crates/typst-layout/src/inline/linebreak.rs
index 236d6892..7b66fcdb 100644
--- a/crates/typst-layout/src/inline/linebreak.rs
+++ b/crates/typst-layout/src/inline/linebreak.rs
@@ -971,11 +971,13 @@ where
}
/// Estimates the metrics for the line spanned by the range.
+ #[track_caller]
fn estimate(&self, range: Range) -> T {
self.get(range.end) - self.get(range.start)
}
/// Get the metric at the given byte position.
+ #[track_caller]
fn get(&self, index: usize) -> T {
match index.checked_sub(1) {
None => T::default(),