From 758ee78ef57ebbaadacc50817620a540bcf8beeb Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:08:55 +0800 Subject: Make `World::font` implementations safe (#6117) --- tests/src/world.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/src') diff --git a/tests/src/world.rs b/tests/src/world.rs index 9e0e91ad..fe2bd45e 100644 --- a/tests/src/world.rs +++ b/tests/src/world.rs @@ -67,7 +67,7 @@ impl World for TestWorld { } fn font(&self, index: usize) -> Option { - Some(self.base.fonts[index].clone()) + self.base.fonts.get(index).cloned() } fn today(&self, _: Option) -> Option { -- cgit v1.2.3