From 0e8c2e080daa440b8153438acc95e4549bf93a47 Mon Sep 17 00:00:00 2001 From: Tobias Schmitz Date: Tue, 20 May 2025 14:30:26 +0200 Subject: [PATCH] refactor: fix some clippy warnings --- crates/typst-layout/src/image.rs | 2 +- crates/typst-syntax/src/source.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.