Remove serde:🇩🇪:Error implementation for error::Error

Serde forces us to be generic over which error our visitor returns, so we cannot return our error type.
So the implementation of serde's error trait is useless to us at this state.

Relates to #18
This commit is contained in:
Sebastian Schmidt 2019-03-23 15:27:18 +02:00
parent a7ca4c717d
commit 16a79cd567

View File

@ -1,7 +1,7 @@
use ::Node;
use interface::build_operator_tree;
use serde::{de, Deserialize, Deserializer};
use std::fmt;
use ::{Error, Node};
impl<'de> Deserialize<'de> for Node {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
@ -34,9 +34,3 @@ impl<'de> de::Visitor<'de> for NodeVisitor {
}
}
}
impl de::Error for Error {
fn custom<T: fmt::Display>(msg: T) -> Self {
Error::Custom(msg.to_string())
}
}