summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/text/raw.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-01-10 17:54:11 +0100
committerGitHub <noreply@github.com>2025-01-10 16:54:11 +0000
commit6b9b78596a6103dfbcadafaeb03eda624da5306a (patch)
tree073a9e31f504634290337c20432ea13dc7a8953d /crates/typst-library/src/text/raw.rs
parent9473aface183feaf48601c5264c3604f5798169e (diff)
Don't generate accessors for required fields (#5680)
Diffstat (limited to 'crates/typst-library/src/text/raw.rs')
-rw-r--r--crates/typst-library/src/text/raw.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index cd718d2a..01d6d8f0 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -315,7 +315,7 @@ impl Packed<RawElem> {
#[comemo::memoize]
fn highlight(&self, styles: StyleChain) -> Vec<Packed<RawLine>> {
let elem = self.as_ref();
- let lines = preprocess(elem.text(), styles, self.span());
+ let lines = preprocess(&elem.text, styles, self.span());
let count = lines.len() as i64;
let lang = elem
@@ -490,7 +490,7 @@ impl Figurable for Packed<RawElem> {}
impl PlainText for Packed<RawElem> {
fn plain_text(&self, text: &mut EcoString) {
- text.push_str(&self.text().get());
+ text.push_str(&self.text.get());
}
}
@@ -638,13 +638,13 @@ pub struct RawLine {
impl Show for Packed<RawLine> {
#[typst_macros::time(name = "raw.line", span = self.span())]
fn show(&self, _: &mut Engine, _styles: StyleChain) -> SourceResult<Content> {
- Ok(self.body().clone())
+ Ok(self.body.clone())
}
}
impl PlainText for Packed<RawLine> {
fn plain_text(&self, text: &mut EcoString) {
- text.push_str(self.text());
+ text.push_str(&self.text);
}
}