diff --git a/src/bin/bitsy-validate.rs b/src/bin/bitsy-validate.rs index 78d7fa2..ba9c833 100644 --- a/src/bin/bitsy-validate.rs +++ b/src/bin/bitsy-validate.rs @@ -2,12 +2,10 @@ extern crate bitsy_parser; use bitsy_parser::game::Game; use std::{env, fs}; +const SYNTAX_ERROR: &str = "No input path specified. Usage: `bitsy-validate filepath`"; + fn main() { - let input_file = env::args() - .nth(1) - .expect("No input path specified. Usage: `bitsy-validate filepath`"); - + let input_file = env::args().nth(1).expect(SYNTAX_ERROR); Game::from(fs::read_to_string(input_file).unwrap()).unwrap(); - println!("OK!"); }