error for parsing game
This commit is contained in:
parent
4d33a0a284
commit
716554e88b
|
@ -102,8 +102,11 @@ pub struct Game {
|
||||||
pub(crate) line_endings_crlf: bool, // otherwise lf (unix/mac)
|
pub(crate) line_endings_crlf: bool, // otherwise lf (unix/mac)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct GameHasNoAvatar;
|
||||||
|
|
||||||
impl Game {
|
impl Game {
|
||||||
pub fn from(string: String) -> Result<Game, &'static dyn Error> {
|
pub fn from(string: String) -> Result<Game, GameHasNoAvatar> {
|
||||||
let line_endings_crlf = string.contains("\r\n");
|
let line_endings_crlf = string.contains("\r\n");
|
||||||
let mut string = string;
|
let mut string = string;
|
||||||
if line_endings_crlf {
|
if line_endings_crlf {
|
||||||
|
|
Loading…
Reference in New Issue