Refactor serde impl.

This commit is contained in:
Stephen Chung
2022-09-25 16:20:36 +08:00
parent b56a9c22f3
commit ce56c43bc0
6 changed files with 157 additions and 223 deletions

View File

@@ -83,6 +83,7 @@ impl Serialize for Dynamic {
}
impl Serialize for ImmutableString {
#[inline(always)]
fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error> {
ser.serialize_str(self.as_str())
}