Allow the json::builder::ObjectBuilder to insert &str keys

This commit is contained in:
Erick Tryzelaar
2014-11-14 09:06:25 -08:00
parent 3c26cb9fe5
commit 7dee5a64d5
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -639,3 +639,9 @@ impl<A:ToJson> ToJson for Option<A> {
}
}
}
impl<'a, T: ToJson> ToJson for &'a T {
fn to_json(&self) -> Value {
(*self).to_json()
}
}