From 3aa59ef230c636a0c0aefac94030610b8228953f Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Sun, 17 Mar 2024 19:24:28 +0100 Subject: [PATCH] Update A instruction parsing condition --- src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.rs b/src/parser.rs index b804abb..ea9e306 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -4,7 +4,7 @@ use regex::Regex; pub fn parse(instruction: &String) -> Instruction { let mut cloned = instruction.clone(); - if cloned.chars().nth(0).unwrap() == '@' { + if cloned.starts_with('@') { cloned.remove(0); return Instruction::AInstruction(AInstruction {