minesweep-rs
minesweep-rs copied to clipboard
Subtract overflow in Pad Height
Hey there,
this is my first time posting an issue! I forked the repo and tried to use cargo run
on it but it threw a Subtract with Overflow
error. So, it turns out in ui.rs
the mine_rect.height
is < grid_height
. I fixed it by having a default value of 10
as such:
let vertical_pad_block_height = block_height(mines_rect.height, grid_height).unwrap_or(10);
I know this isn't the best way to solve it and I'd love to learn how to make better ones.
I'd really appreciate feedback on how to improve on submitting issues too.