Skip to content

Commit

Permalink
add error message (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakird committed Nov 22, 2024
1 parent 18671ee commit 91ca4b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/contours.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ where
let mut pos3 = curr;

loop {
contour_points
.push(Point::new(cast(pos3.x).unwrap(), cast(pos3.y).unwrap()));
contour_points.push(Point::new(
cast(pos3.x).expect("Generic Type Parameter T should be bigger than width."),
cast(pos3.y).expect("Generic Type Parameter T should be bigger than height."),
));
rotate_to_value(&mut diffs, pos2.to_i32() - pos3.to_i32());
let pos4 = diffs
.iter()
Expand Down

0 comments on commit 91ca4b1

Please sign in to comment.