From a20bcfed7d3b6aacc3211514d9804651a458e725 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 27 Sep 2020 15:33:09 +0200 Subject: 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} --- src/errors.rs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/errors.rs') 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 = std::result::Result; -- cgit