use #[deriving_deserializable] everywhere

This commit is contained in:
Erick Tryzelaar 2014-08-02 15:42:49 -07:00
parent 9d43fe43a9
commit 62eda3e19f
2 changed files with 9 additions and 0 deletions

View File

@ -7,11 +7,13 @@ use de::{Deserializer, Deserializable, Token};
//////////////////////////////////////////////////////////////////////////////
#[deriving(Clone, PartialEq, Show, Decodable)]
#[deriving_deserializable]
enum Animal {
Dog,
Frog(String, int)
}
/*
impl Deserializable for Animal {
#[inline]
fn deserialize_token<
@ -34,6 +36,7 @@ impl Deserializable for Animal {
}
}
}
*/
//////////////////////////////////////////////////////////////////////////////

View File

@ -9,12 +9,14 @@ use de::{Token, Deserializer, Deserializable};
//////////////////////////////////////////////////////////////////////////////
#[deriving(Clone, PartialEq, Show, Decodable)]
#[deriving_deserializable]
struct Inner {
a: (),
b: uint,
c: HashMap<String, Option<char>>,
}
/*
impl Deserializable for Inner {
#[inline]
fn deserialize_token<
@ -64,14 +66,17 @@ impl Deserializable for Inner {
}
}
}
*/
//////////////////////////////////////////////////////////////////////////////
#[deriving(Clone, PartialEq, Show, Decodable)]
#[deriving_deserializable]
struct Outer {
inner: Vec<Inner>,
}
/*
impl Deserializable for Outer {
#[inline]
fn deserialize_token<
@ -113,6 +118,7 @@ impl Deserializable for Outer {
}
}
}
*/
//////////////////////////////////////////////////////////////////////////////