render: Replaced unwrap with expect in shape_utils
This commit is contained in:
parent
8f684d6943
commit
85f0c9dde9
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue