diff --git a/de.rs b/de.rs index d85e8b66..a3542881 100644 --- a/de.rs +++ b/de.rs @@ -1,4 +1,12 @@ -extern crate collections; +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. use std::hash::Hash; use std::num; @@ -439,11 +447,13 @@ impl< ////////////////////////////////////////////////////////////////////////////// -macro_rules! peel(($name:ident, $($other:ident,)*) => (deserialize_tuple!($($other,)*))) +macro_rules! peel { + ($name:ident, $($other:ident,)*) => (impl_deserialize_tuple!($($other,)*)) +} -macro_rules! deserialize_tuple ( +macro_rules! impl_deserialize_tuple { () => (); - ( $($name:ident,)+ ) => ( + ( $($name:ident,)+ ) => { impl< E, D: Deserializer, @@ -470,10 +480,10 @@ macro_rules! deserialize_tuple ( } } peel!($($name,)*) - ) -) + } +} -deserialize_tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, } +impl_deserialize_tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, } ////////////////////////////////////////////////////////////////////////////// @@ -823,7 +833,7 @@ mod tests { } #[test] - fn test_tokens_strbuf() { + fn test_tokens_string() { let tokens = vec!( String("a".to_string()), );