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
..
2022-05-17 15:20:32 +08:00
2022-01-14 23:19:27 +08:00
2022-03-09 09:25:55 +08:00
2021-07-04 00:15:27 +08:00
2022-02-08 09:02:15 +08:00
2021-04-20 12:01:35 +08:00
2022-02-08 09:46:14 +08:00
2022-01-10 13:26:33 +08:00
2020-08-23 18:04:19 +08:00
2022-02-08 09:02:15 +08:00
2022-02-08 09:02:15 +08:00
2022-02-08 09:02:15 +08:00
2022-02-08 09:02:15 +08:00
2022-02-08 09:46:14 +08:00
2021-12-31 18:55:48 +08:00
2022-02-08 09:02:15 +08:00
2022-05-19 10:02:12 +08:00
2022-02-08 09:46:14 +08:00
2022-05-19 16:56:22 +08:00
2022-02-08 09:02:15 +08:00
2022-02-08 09:02:15 +08:00
2022-05-21 11:57:23 +08:00
2021-01-24 21:21:15 +08:00
2022-02-08 09:46:14 +08:00
2022-02-08 09:02:15 +08:00
2020-09-28 22:14:19 +08:00
2022-01-04 22:16:20 +08:00
2021-02-10 12:41:27 +08:00
2020-10-07 22:56:21 +08:00
2022-02-08 09:46:14 +08:00
2022-02-08 09:02:15 +08:00
2022-01-10 13:26:33 +08:00
2022-02-08 09:02:15 +08:00
2022-01-12 08:12:28 +08:00
2020-10-11 21:58:11 +08:00
2022-04-21 10:04:46 +08:00
2022-05-02 12:14:53 +08:00

Tests

Rhai engine tests.

How to Run

cargo test