rhai/src/serde
Geoffroy Couprie f2b5566c0b use smartstring's deserializer to support non borrowed strings
The map visitor for Dynamic was expecting a &str for the key, but the
serde_json deserializer internally uses a Cow string, which can be
Borrowed or Owned. In the case of Owned, the serde_json key deserializer
is calling visit_string on the Visitor, which for &str will result in
the error:
Error("invalid type: string \"a\", expected a borrowed string", line: 0,
column: 0)

smartstring actually has its own Visitor implementation that handles
both cases, so we can use it instead of an explicit conversion.
2022-05-23 16:40:49 +02:00
..
de.rs Simplify using .. 2022-02-08 09:02:15 +08:00
deserialize.rs use smartstring's deserializer to support non borrowed strings 2022-05-23 16:40:49 +02:00
metadata.rs Reverse Box<[...]> to Vec. 2022-03-06 16:37:27 +08:00
mod.rs Reduce feature gates. 2021-12-06 20:52:47 +08:00
ser.rs Unused parameters naming. 2022-04-11 16:29:16 +08:00
serialize.rs Simplify using .. 2022-02-08 09:02:15 +08:00
str.rs Use type alias for error. 2021-12-27 12:27:31 +08:00