render: Replaced unwrap with expect in shape_utils

This commit is contained in:
Nathan Adams 2022-12-31 00:41:34 +01:00
parent 8f684d6943
commit 85f0c9dde9
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ impl PathSegment {
fn to_draw_commands(&self) -> impl '_ + Iterator<Item = DrawCommand> { fn to_draw_commands(&self) -> impl '_ + Iterator<Item = DrawCommand> {
assert!(!self.is_empty()); assert!(!self.is_empty());
let mut i = self.points.iter(); let mut i = self.points.iter();
let first = i.next().unwrap(); let first = i.next().expect("Points isn't empty");
std::iter::once(DrawCommand::MoveTo { std::iter::once(DrawCommand::MoveTo {
x: first.x, x: first.x,
y: first.y, y: first.y,