diff --git a/src/bin/smiley.rs b/src/bin/smiley.rs index 6b4d288..1bca3bc 100644 --- a/src/bin/smiley.rs +++ b/src/bin/smiley.rs @@ -12,7 +12,9 @@ fn main() { .nth(2) .expect("No output path specified. Usage: `smiley infile outfile`"); - let mut game = Game::from(fs::read_to_string(input_file).unwrap()); + let mut game = Game::from( + fs::read_to_string(input_file).unwrap() + ).unwrap(); game.avatar.animation_frames = vec![Image { pixels: vec![ diff --git a/src/game.rs b/src/game.rs index b0cf1a6..b052c11 100644 --- a/src/game.rs +++ b/src/game.rs @@ -41,7 +41,7 @@ pub struct Game { } impl Game { - fn from(string: String) -> Result { + pub fn from(string: String) -> Result { let mut string = format!("{}\n\n", string.trim_matches('\n')); if string.starts_with("# BITSY VERSION") {