diff --git a/src/main.rs b/src/main.rs index c10155e..7520c9b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,11 @@ fn parse_instruction(c: char) -> Result { } } -fn main() { - let file_data = include_str!("../two_robots.txt"); +fn open_file(filename: &str) -> io::Result { + let content = fs::read_to_string(filename)?; + Ok(content) +} + +fn main() { + let conf = open_file("two_robots.txt"); }