summaryrefslogtreecommitdiff
path: root/docs/src/html.rs
diff options
context:
space:
mode:
authorMyriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>2025-03-31 16:08:55 +0800
committerGitHub <noreply@github.com>2025-03-31 08:08:55 +0000
commit758ee78ef57ebbaadacc50817620a540bcf8beeb (patch)
tree5afc87df894c3d147971a6c660069176e4ba2d2f /docs/src/html.rs
parentefdb75558f20543af39f75fb88b3bae59b20e2e8 (diff)
Make `World::font` implementations safe (#6117)
Diffstat (limited to 'docs/src/html.rs')
-rw-r--r--docs/src/html.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/src/html.rs b/docs/src/html.rs
index 9077d5c4..9c02f08e 100644
--- a/docs/src/html.rs
+++ b/docs/src/html.rs
@@ -498,7 +498,7 @@ impl World for DocWorld {
}
fn font(&self, index: usize) -> Option<Font> {
- Some(FONTS.1[index].clone())
+ FONTS.1.get(index).cloned()
}
fn today(&self, _: Option<i64>) -> Option<Datetime> {