mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 01:12:24 +00:00
xml: new variant flag and fixes to generic types
This commit is contained in:
@@ -20,21 +20,6 @@ pub trait Value: Sized {
|
||||
fn deserialize(val: &str) -> Result<Self, XmlDeError>;
|
||||
}
|
||||
|
||||
// impl<T: Value> Value for Option<T> {
|
||||
// fn serialize(&self) -> String {
|
||||
// match self {
|
||||
// Some(inner) => inner.serialize(),
|
||||
// None => "".to_owned(),
|
||||
// }
|
||||
// }
|
||||
// fn deserialize(val: &str) -> Result<Self, XmlDeError> {
|
||||
// match val {
|
||||
// "" => Ok(None),
|
||||
// val => Ok(Some(T::deserialize(val)?)),
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
macro_rules! impl_value_parse {
|
||||
($t:ty) => {
|
||||
impl Value for $t {
|
||||
|
||||
Reference in New Issue
Block a user