Skip to content

Commit

Permalink
add expect call to parse_rgba rather than just straight unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
gillett-hernandez committed Dec 3, 2023
1 parent a4f967f commit 15dae54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parsing/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct TextureStackData(pub Vec<TextureData>);
pub fn parse_rgba(filepath: &str) -> Vec2D<f32x4> {
info!("parsing rgba texture at {}", filepath);
let path = Path::new(filepath);
let img = image::open(path).unwrap();
let img = image::open(path).expect(&*format!("could not find file at {}", filepath));
let rgba_image = img.into_rgba8();
let (width, height) = rgba_image.dimensions();
let mut new_film = Vec2D::new(width as usize, height as usize, f32x4::splat(0.0));
Expand Down

0 comments on commit 15dae54

Please sign in to comment.