mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
expect instead of unwrap
This commit is contained in:
parent
96a3c81cbb
commit
b654c2f923
@ -942,7 +942,9 @@ impl Structure for Tavern {
|
||||
let mut offset = 0;
|
||||
let mut choose = |slice: &[Rgb<u8>]| -> Rgb<u8> {
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user