diff --git a/crates/typst-layout/src/image.rs b/crates/typst-layout/src/image.rs index 56eeaea09..05d60d330 100644 --- a/crates/typst-layout/src/image.rs +++ b/crates/typst-layout/src/image.rs @@ -65,7 +65,7 @@ pub fn layout_image( engine.world, &families(styles).map(|f| f.as_str()).collect::>(), ) - .in_text(&data)?, + .in_text(data)?, ), }; diff --git a/crates/typst-syntax/src/source.rs b/crates/typst-syntax/src/source.rs index e4a3982b7..514cb9a4a 100644 --- a/crates/typst-syntax/src/source.rs +++ b/crates/typst-syntax/src/source.rs @@ -63,7 +63,7 @@ impl Source { /// The whole source as a string slice. pub fn text(&self) -> &str { - &self.0.lines.text() + self.0.lines.text() } /// Slice out the part of the source code enclosed by the range.