From: Chris Morgan Date: Sat, 25 Apr 2015 09:28:12 +0000 (+1000) Subject: Implement Debug for Map and RawMap. X-Git-Tag: 0.11.0~2 X-Git-Url: https://git.chrismorgan.info/anymap/commitdiff_plain/ecb4c450602c46b3d66e641a22c54c3903b66187 Implement Debug for Map and RawMap. --- diff --git a/src/any.rs b/src/any.rs index 45ad5cc..5b5e6e6 100644 --- a/src/any.rs +++ b/src/any.rs @@ -116,15 +116,9 @@ pub trait IntoBox: Any { macro_rules! implement { ($base:ident, $(+ $bounds:ident)*) => { - impl<'a> fmt::Debug for &'a ($base $(+ $bounds)*) { + impl fmt::Debug for $base $(+ $bounds)* { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad(stringify!(&($base $(+ $bounds)*))) - } - } - - impl<'a> fmt::Debug for Box<$base $(+ $bounds)*> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad(stringify!(Box<$base $(+ $bounds)*>)) + f.pad(stringify!($base $(+ $bounds)*)) } } diff --git a/src/lib.rs b/src/lib.rs index 8e83bab..4bc330f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -427,10 +427,15 @@ mod tests { fn assert_send() { } fn assert_sync() { } fn assert_clone() { } + fn assert_debug() { } assert_send::>(); assert_send::>(); assert_sync::>(); assert_sync::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); assert_send::>(); assert_send::>(); assert_sync::>(); @@ -439,5 +444,9 @@ mod tests { assert_clone::>(); assert_clone::>(); assert_clone::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); + assert_debug::>(); } }