From 62eda3e19fe90999511d4a8a25b297f22ff84928 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sat, 2 Aug 2014 15:42:49 -0700 Subject: [PATCH] use #[deriving_deserializable] everywhere --- src/bench_enum.rs | 3 +++ src/bench_struct.rs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/bench_enum.rs b/src/bench_enum.rs index 7b20acdf..86234f4b 100644 --- a/src/bench_enum.rs +++ b/src/bench_enum.rs @@ -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 { } } } +*/ ////////////////////////////////////////////////////////////////////////////// diff --git a/src/bench_struct.rs b/src/bench_struct.rs index eec51861..e4d5d164 100644 --- a/src/bench_struct.rs +++ b/src/bench_struct.rs @@ -9,12 +9,14 @@ use de::{Token, Deserializer, Deserializable}; ////////////////////////////////////////////////////////////////////////////// #[deriving(Clone, PartialEq, Show, Decodable)] +#[deriving_deserializable] struct Inner { a: (), b: uint, c: HashMap>, } +/* 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, } +/* impl Deserializable for Outer { #[inline] fn deserialize_token< @@ -113,6 +118,7 @@ impl Deserializable for Outer { } } } +*/ //////////////////////////////////////////////////////////////////////////////