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