diff --git a/src/image.rs b/src/image.rs index 4106990..38d7edd 100644 --- a/src/image.rs +++ b/src/image.rs @@ -12,7 +12,9 @@ impl From for Image { let pixels = &pixels[1..(pixels.len() - 1)]; let pixels: Vec = pixels .iter() - .map(|&pixel| pixel.parse::().unwrap()) + .map(|&pixel| + pixel.parse::().expect(&format!("Bad pixel in image: {}\n", pixel)) + ) .collect(); Image { pixels }