mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 03:25:46 -04:00
`wasm_bindgen::JsValue::(from|to)_serde` now emit warnings because of a circular dependency. To solve this problem, this patch now uses `gloo-utils`, see https://rustwasm.github.io/wasm-bindgen/reference/arbitrary-data-with-serde.html#an-alternative-approach---using-json. Ideally, we would like to use `serde_wasm_bindgen` but the behaviour isn't the same. `gloo-utils` serializes and deserialized through JSON, whilst `serde_wasm_bindgen` manipulates the `JsValue` directly which can be better or worst dependending of the case. This patch conserves the JSON approach as it was the previous and tested one.