From b654c2f923d16ca9077a88d73aa8dce42f018b9f Mon Sep 17 00:00:00 2001 From: Isse Date: Tue, 12 Dec 2023 20:20:03 +0100 Subject: [PATCH] expect instead of unwrap --- world/src/site2/plot/tavern.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/world/src/site2/plot/tavern.rs b/world/src/site2/plot/tavern.rs index 0b1987d630..672c0f846b 100644 --- a/world/src/site2/plot/tavern.rs +++ b/world/src/site2/plot/tavern.rs @@ -942,7 +942,9 @@ impl Structure for Tavern { let mut offset = 0; let mut choose = |slice: &[Rgb]| -> Rgb { offset += 1; - *field.choose(self.door_wpos + offset, slice).unwrap() + *field + .choose(self.door_wpos + offset, slice) + .expect("Color slice should not be empty.") }; let detail_fill = Fill::Brick(