()
| 11 | } |
| 12 | |
| 13 | fn main() -> Result<()> { |
| 14 | env_logger::init(); |
| 15 | // This gets the absolute path to the puzzle.dat file in examples/puzzle_game no matter what |
| 16 | // directory you are in when you run the `cargo run` command. |
| 17 | let puzzle_file_path = &format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "puzzle.dat"); |
| 18 | let puzzle = match get_puzzle(puzzle_file_path).context("Couldn't get the first puzzle") { |
| 19 | Ok(p) => p, |
| 20 | Err(_) => Puzzle::new(), |
| 21 | }; |
| 22 | info!("Playing puzzle: {}", puzzle.name); |
| 23 | Ok(()) |
| 24 | } |
nothing calls this directly
no test coverage detected