From 46f8831c7b4b810d2387969dfe71b5d80627ef85 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sun, 18 Oct 2020 18:05:14 +0100 Subject: [PATCH] tidyup --- src/game.rs | 2 +- src/sprite.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/game.rs b/src/game.rs index d6a69d2..5922761 100644 --- a/src/game.rs +++ b/src/game.rs @@ -255,7 +255,7 @@ impl Game { } if ! avatar_exists { - warnings.push(crate::Error::Game { missing: NotFound::Avatar}); + warnings.push(crate::Error::Game { missing: NotFound::Avatar }); } Ok( diff --git a/src/sprite.rs b/src/sprite.rs index 984f800..2a7adda 100644 --- a/src/sprite.rs +++ b/src/sprite.rs @@ -51,9 +51,7 @@ impl Sprite { format!("\n{}", lines.join("\n")) } } -} - -impl Sprite { + pub fn from_str(str: &str) -> Result { let mut lines: Vec<&str> = str.lines().collect();