From aa8ac251f6be29506f4cc0c507a4901e0bd002c4 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sat, 11 Apr 2020 23:24:36 +0100 Subject: [PATCH] column width --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 44f97f7..2791b2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -429,7 +429,9 @@ fn image_from_string(string: String) -> Image { let pixels: Vec<&str> = string.split("").collect(); // the above seems to add an extra "" at the start and end of the vec, so strip them below let pixels = &pixels[1..(pixels.len() - 1)]; - let pixels: Vec = pixels.iter().map(|&pixel| { pixel.parse::().unwrap() }).collect(); + let pixels: Vec = pixels.iter().map(|&pixel| { + pixel.parse::().unwrap() + }).collect(); Image { pixels } }