diff --git a/src/main.rs b/src/main.rs index 5586a51..1185e27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,8 +9,14 @@ fn main() -> Result<()> { let mut memory: HashMap = HashMap::new(); - for instruction in buffer.lines() { - let ops: Vec = instruction? + for line in buffer.lines() { + let line = line?; + + if line.clone().trim().is_empty() { + continue; + } + + let ops: Vec = line.trim() .split_whitespace() .map(String::from) .collect();