From b34f91c933693b600c17c5d65a2d42d20721ba7e Mon Sep 17 00:00:00 2001 From: ~karx Date: Sun, 7 Feb 2021 17:30:10 +0000 Subject: [PATCH] Change separator to be a newline instead of space --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5b0d72f..76a7e90 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,9 +16,9 @@ impl Program { fn from_string(program: String) -> Program { let mut op_list: Vec = Vec::new(); - for opcode in program.split(" ").collect::>() { - let mut new_op = opcode.to_owned(); - new_op = new_op.replace("\n", ""); + for opcode in program.split("\n").collect::>() { + let new_op = opcode.to_owned(); + // new_op = new_op.replace("\n", ""); if new_op.len() != 0 { op_list.push(new_op.to_owned());