enum Orientation { N, E, S, W, } enum Instruction { L, R, F, } fn parse_orientation(c: char) -> Option { match c { 'N' => Some(Orientation::N), 'E' => Some(Orientation::E), 'S' => Some(Orientation::S), 'W' => Some(Orientation::W), _ => None, } } fn parse_instruction(c: char) -> Option { match c { 'L' => Some(Instruction::L), 'R' => Some(Instruction::R), 'F' => Some(Instruction::F), _ => None, } } fn main() { let file_data = include_str!("../two_robots.txt"); }