summary refs log tree commit diff
path: root/06/src
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@gmail.com>2020-12-06 01:15:02 -0800
committerIrene Knapp <ireneista@gmail.com>2020-12-06 01:15:02 -0800
commit07acfa0b030cc2f481f76fc85a664bfbcddbc623 (patch)
treeb4d55f5fd2bf56279994677e12ed47e9478d9683 /06/src
parent08a18531f04a395a556444ecba149356eeddf9d7 (diff)
Add a function that trims the lines
Diffstat (limited to '06/src')
-rw-r--r--06/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/06/src/main.rs b/06/src/main.rs
index 72e4f1d..00d065c 100644
--- a/06/src/main.rs
+++ b/06/src/main.rs
@@ -12,7 +12,8 @@ fn main() -> Result<()> {
   let filename = args.next().unwrap();
 
   let input = advent_lib::read_lines_file(&filename)?;
-  let groups = advent_lib::group_lines_by_blanks(input)?;
+  let trimmed = advent_lib::trim_lines(&input);
+  let groups = advent_lib::group_lines_by_blanks(trimmed);
 
   let mut unioned_sum = 0;