refactor: refactor

This commit is contained in:
graelo 2020-05-27 10:04:42 +02:00
parent 623c66cbba
commit 791aaadd49
10 changed files with 655 additions and 468 deletions

View file

@ -8,6 +8,7 @@ pub enum ParseError {
ExpectedPaneIdMarker,
ExpectedInt(std::num::ParseIntError),
ExpectedBool(std::str::ParseBoolError),
ExpectedString(String),
ProcessFailure(String),
}
@ -22,6 +23,7 @@ impl fmt::Display for ParseError {
ParseError::ExpectedPaneIdMarker => write!(f, "Expected pane id marker"),
ParseError::ExpectedInt(msg) => write!(f, "Expected an int: {}", msg),
ParseError::ExpectedBool(msg) => write!(f, "Expected a bool: {}", msg),
ParseError::ExpectedString(msg) => write!(f, "Expected {}", msg),
ParseError::ProcessFailure(msg) => write!(f, "{}", msg),
}
}