panic/foramt lint
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-13 18:44:16 -07:00
parent ea30bc9ed4
commit 4cddc8571f
5 changed files with 10 additions and 10 deletions

View File

@@ -27,16 +27,16 @@ impl Texture for ImageTexture {
let x = (u % 1. * (self.width - 1.)) as u32;
let y = ((1. - v % 1.) * (self.height - 1.)) as u32;
if x >= self.width as u32 {
panic!(format!(
panic!(
"u {} v {} x {} y {} w {} h {}",
u, v, x, y, self.width, self.height
));
);
}
if y >= self.height as u32 {
panic!(format!(
panic!(
"u {} v {} x {} y {} w {} h {}",
u, v, x, y, self.width, self.height
));
);
}
let pixel = self.img.get_pixel(x, y);
Vec3::new(

View File

@@ -27,7 +27,7 @@ fn hsv_to_rgb(h: f32, s: f32, v: f32) -> Vec3 {
3 => Vec3::new(p, q, v),
4 => Vec3::new(t, p, v),
5 => Vec3::new(v, p, q),
_ => panic!(format!("Unknown H value {}", h_i)),
_ => panic!("Unknown H value {}", h_i),
}
}