Fix #[derive_serialize] for tuple structs

This commit is contained in:
Erick Tryzelaar
2015-03-06 19:11:47 -08:00
parent 6b7aa269b8
commit a565df9cf7
4 changed files with 215 additions and 34 deletions
+9
View File
@@ -605,6 +605,15 @@ impl<'a, T> Serialize for &'a T where T: Serialize {
}
}
impl<'a, T> Serialize for &'a mut T where T: Serialize {
#[inline]
fn visit<V>(&self, visitor: &mut V) -> Result<V::Value, V::Error>
where V: Visitor,
{
(**self).visit(visitor)
}
}
impl<T> Serialize for Box<T> where T: Serialize {
#[inline]
fn visit<V>(&self, visitor: &mut V) -> Result<V::Value, V::Error>