debug message for bad pixels
This commit is contained in:
@@ -12,7 +12,9 @@ impl From<String> for Image {
|
||||
let pixels = &pixels[1..(pixels.len() - 1)];
|
||||
let pixels: Vec<u32> = pixels
|
||||
.iter()
|
||||
.map(|&pixel| pixel.parse::<u32>().unwrap())
|
||||
.map(|&pixel|
|
||||
pixel.parse::<u32>().expect(&format!("Bad pixel in image: {}\n", pixel))
|
||||
)
|
||||
.collect();
|
||||
|
||||
Image { pixels }
|
||||
|
||||
Reference in New Issue
Block a user