diff options
| author | troido <troido@protonmail.com> | 2020-09-27 15:33:09 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-09-27 15:33:09 +0200 |
| commit | a20bcfed7d3b6aacc3211514d9804651a458e725 (patch) | |
| tree | d4d4aaab553a3a9065e9dba8ef4fdec9ccf45778 /src/errors.rs | |
| parent | c3a282d04f1fd5c7cc4cf5ebb478129c2b1c42fa (diff) | |
better serialisation structure for encyclopediae
["list", [1, 2, 3]] is now just [1, 2, 3] and {"type": builtwall", "kwargs": {"health": 50}} is now {":template": "builtwall", "health": 50}
Diffstat (limited to 'src/errors.rs')
| -rw-r--r-- | src/errors.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/errors.rs b/src/errors.rs index 294159c..c58f2ff 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -25,23 +25,3 @@ macro_rules! aerr { } - -#[derive(Debug)] -pub struct ParseError { - pub text: String -} -impl Error for ParseError { - fn source(&self) -> Option<&(dyn Error + 'static)> { - None - } -} -impl Display for ParseError { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "Error: {}", self.text) - } -} -#[macro_export] -macro_rules! perr { - ($($description:tt)*) => {crate::errors::ParseError{text: format!($($description)*)}} -} -pub type PResult<T> = std::result::Result<T, ParseError>; |
