summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/model/bibliography.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/model/bibliography.rs
parent9473aface183feaf48601c5264c3604f5798169e (diff)
Don't generate accessors for required fields (#5680)
Diffstat (limited to 'crates/typst-library/src/model/bibliography.rs')
-rw-r--r--crates/typst-library/src/model/bibliography.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/typst-library/src/model/bibliography.rs b/crates/typst-library/src/model/bibliography.rs
index 4ab4ff22..95db8a22 100644
--- a/crates/typst-library/src/model/bibliography.rs
+++ b/crates/typst-library/src/model/bibliography.rs
@@ -638,7 +638,7 @@ impl<'a> Generator<'a> {
for elem in &self.groups {
let group = elem.to_packed::<CiteGroup>().unwrap();
let location = elem.location().unwrap();
- let children = group.children();
+ let children = &group.children;
// Groups should never be empty.
let Some(first) = children.first() else { continue };
@@ -650,12 +650,11 @@ impl<'a> Generator<'a> {
// Create infos and items for each child in the group.
for child in children {
- let key = *child.key();
- let Some(entry) = database.get(key) else {
+ let Some(entry) = database.get(child.key) else {
errors.push(error!(
child.span(),
"key `{}` does not exist in the bibliography",
- key.resolve()
+ child.key.resolve()
));
continue;
};
@@ -682,7 +681,7 @@ impl<'a> Generator<'a> {
};
normal &= special_form.is_none();
- subinfos.push(CiteInfo { key, supplement, hidden });
+ subinfos.push(CiteInfo { key: child.key, supplement, hidden });
items.push(CitationItem::new(entry, locator, None, hidden, special_form));
}