summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authoremilylime <emilyyyylime+git@gmail.com>2024-01-05 16:12:27 +0200
committerGitHub <noreply@github.com>2024-01-05 14:12:27 +0000
commit4a65c2115ba3f534d56d77689acf433ad7c67a05 (patch)
tree5fe9a958bbeb9fc3ca809b38924d16fb0398102c /crates
parentd651c6e0e6f7df62ebfdd85f23864097607feb46 (diff)
Fix typos (#3126)
Diffstat (limited to 'crates')
-rw-r--r--crates/typst/src/engine.rs4
-rw-r--r--crates/typst/src/model/bibliography.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/typst/src/engine.rs b/crates/typst/src/engine.rs
index 85fa4301..7f094578 100644
--- a/crates/typst/src/engine.rs
+++ b/crates/typst/src/engine.rs
@@ -73,10 +73,10 @@ impl Route<'_> {
/// The maximum stack nesting depth.
pub const MAX_SHOW_RULE_DEPTH: usize = 64;
- /// The maxmium layout nesting depth.
+ /// The maximum layout nesting depth.
pub const MAX_LAYOUT_DEPTH: usize = 72;
- /// The maxmium function call nesting depth.
+ /// The maximum function call nesting depth.
pub const MAX_CALL_DEPTH: usize = 80;
}
diff --git a/crates/typst/src/model/bibliography.rs b/crates/typst/src/model/bibliography.rs
index 936c44fe..fa35936b 100644
--- a/crates/typst/src/model/bibliography.rs
+++ b/crates/typst/src/model/bibliography.rs
@@ -836,13 +836,13 @@ impl<'a> Generator<'a> {
) -> Option<Vec<(Option<Content>, Content)>> {
let rendered = rendered.bibliography.as_ref()?;
- // Determine for each citation key where it first occured, so that we
+ // Determine for each citation key where it first occurred, so that we
// can link there.
- let mut first_occurances = HashMap::new();
+ let mut first_occurrences = HashMap::new();
for info in &self.infos {
for subinfo in &info.subinfos {
let key = subinfo.key.as_str();
- first_occurances.entry(key).or_insert(info.location);
+ first_occurrences.entry(key).or_insert(info.location);
}
}
@@ -866,7 +866,7 @@ impl<'a> Generator<'a> {
// Render the first field.
let mut prefix = item.first_field.as_ref().map(|elem| {
let mut content = renderer.display_elem_child(elem, &mut None);
- if let Some(location) = first_occurances.get(item.key.as_str()) {
+ if let Some(location) = first_occurrences.get(item.key.as_str()) {
let dest = Destination::Location(*location);
content = content.linked(dest);
}