make some functions public; from_str functions; impl Display; error handling for Image

This commit is contained in:
2020-10-18 15:14:12 +01:00
parent 1c5315ddad
commit 0dcddb9d8e
5 changed files with 32 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
use crate::{optional_data_line, AnimationFrames, Image};
use crate::image::animation_frames_from_string;
use crate::image::animation_frames_from_str;
#[derive(Clone, Debug, Eq)]
pub struct Tile {
@@ -103,8 +103,8 @@ impl From<String> for Tile {
}
}
let animation_frames = animation_frames_from_string(
lines[1..].join("\n")
let animation_frames = animation_frames_from_str(
&lines[1..].join("\n")
);
Tile {