Skip to content

Commit

Permalink
glyphs.rs: remove erroneous unwrap in From<Glif> for Glyph impl
Browse files Browse the repository at this point in the history
Closes #29
  • Loading branch information
epilys committed Mar 20, 2023
1 parent e6afbad commit e8dc9e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/glyphs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ impl From<glif::Glif> for Glyph {
let last_point = points.back().unwrap();
prev_point = (last_point.x, last_point.y);
}
if points.front().unwrap().is_line() {
if points.front().map(|p| p.is_line()).unwrap_or(false) {
let p = points.back().unwrap();
prev_point = (p.x, p.y);
}
Expand Down

0 comments on commit e8dc9e0

Please sign in to comment.