remove unwrap TODO

This commit is contained in:
Isse 2023-04-25 17:25:17 +02:00 committed by Sam
parent 19b90d078a
commit 62a598c59b
2 changed files with 5 additions and 3 deletions

View File

@ -51,8 +51,10 @@ fn main() -> Result {
for x in aabb.min.x..aabb.max.x {
for y in aabb.min.y..aabb.max.y {
// TODO: remove unwrap
let col = canvas.col(Vec2::new(x, y)).unwrap().get_info();
let col = canvas
.col(Vec2::new(x, y))
.map(|col| col.get_info())
.unwrap_or_default();
for z in aabb.min.z..aabb.max.z {
let pos = Vec3::new(x, y, z);

View File

@ -1259,7 +1259,7 @@ impl ColumnSample<'_> {
// For a version of ColumnSample that can easily be moved around. Feel free to
// add non reference fields as needed.
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct ColInfo {
pub alt: f32,
pub basement: f32,