mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 02:28:00 +00:00
Allow the json::builder::ObjectBuilder to insert &str keys
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user