diff --git a/src/main.rs b/src/main.rs index c10155e..186271e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ enum Instruction { F, } -fn parse_orientation(c: char) -> Result { +fn parse_orientation(c: &char) -> Result { match c { 'N' => Ok(Orientation::N), 'E' => Ok(Orientation::E), @@ -21,7 +21,7 @@ fn parse_orientation(c: char) -> Result { } } -fn parse_instruction(c: char) -> Result { +fn parse_instruction(c: &char) -> Result { match c { 'L' => Ok(Instruction::L), 'R' => Ok(Instruction::R),