mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-23 16:10:37 +00:00
vendor some serialization tests from serde_json
This commit is contained in:
@@ -32,6 +32,13 @@ impl ValueEncoder for &str {
|
||||
}
|
||||
}
|
||||
|
||||
impl ValueEncoder for String {
|
||||
#[inline]
|
||||
fn encode(self, v: ValueSer<'_>) {
|
||||
self.as_str().encode(v);
|
||||
}
|
||||
}
|
||||
|
||||
impl ValueEncoder for fmt::Arguments<'_> {
|
||||
#[inline]
|
||||
fn encode(self, v: ValueSer<'_>) {
|
||||
@@ -102,6 +109,13 @@ impl KeyEncoder for &str {
|
||||
}
|
||||
}
|
||||
|
||||
impl KeyEncoder for String {
|
||||
#[inline]
|
||||
fn write_key<'a>(self, obj: &'a mut ObjectSer) -> ValueSer<'a> {
|
||||
self.as_str().write_key(obj)
|
||||
}
|
||||
}
|
||||
|
||||
impl KeyEncoder for fmt::Arguments<'_> {
|
||||
#[inline]
|
||||
fn write_key<'a>(self, obj: &'a mut ObjectSer) -> ValueSer<'a> {
|
||||
|
||||
Reference in New Issue
Block a user