diff --git a/data/19.in b/data/19.in index 931cf9c..08fa3c9 100644 --- a/data/19.in +++ b/data/19.in @@ -774,4 +774,4 @@ sg{x>1447:msc,bsb} {x=619,m=828,a=336,s=762} {x=573,m=101,a=217,s=2115} {x=50,m=1103,a=230,s=1461} -{x=780,m=2290,a=339,s=3021} +{x=780,m=2290,a=339,s=3021} \ No newline at end of file diff --git a/src/bin/day19.rs b/src/bin/day19.rs index 9893365..99c3f70 100644 --- a/src/bin/day19.rs +++ b/src/bin/day19.rs @@ -87,7 +87,7 @@ fn main() -> Result<()> { let mut parts = Vec::new(); for part_str in parts_str.lines() { let mut part = [0, 0, 0, 0]; - for (idx, property) in part_str[1..part.len() - 1].split(',').enumerate() { + for (idx, property) in part_str[1..part_str.len() - 1].split(',').enumerate() { part[idx] = property[2..].parse()?; }