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:
parent
a7ca4c717d
commit
16a79cd567
@ -1,7 +1,7 @@
|
|||||||
|
use ::Node;
|
||||||
use interface::build_operator_tree;
|
use interface::build_operator_tree;
|
||||||
use serde::{de, Deserialize, Deserializer};
|
use serde::{de, Deserialize, Deserializer};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use ::{Error, Node};
|
|
||||||
|
|
||||||
impl<'de> Deserialize<'de> for Node {
|
impl<'de> Deserialize<'de> for Node {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user