diff options
| author | Zeyla Hellyer <[email protected]> | 2017-12-09 09:38:05 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-12-09 09:42:46 -0800 |
| commit | 594d3d2e047f406a2b2243c0e1f023df590b182a (patch) | |
| tree | 7f25b0dc6dcb8df9e879c483e9db9484e32df816 /src/builder | |
| parent | Fall back to `str::parse` on `ChannelId` as well (diff) | |
| download | serenity-594d3d2e047f406a2b2243c0e1f023df590b182a.tar.xz serenity-594d3d2e047f406a2b2243c0e1f023df590b182a.zip | |
Fix snowflake deserializer
Fixes snowflake deserializers (ChannelId, UserId, etc.) by switching
from a usage of `deserialize_u64` to `deserialize_any`.
Our usage of `deserialize_u64` was incorrect and the erroneous behaviour
was fixed in serde_json v1.0.8. We were essentially telling serde that
the received type was a u64, when in fact it can be multiple types
(strings, u64, or an i64 just in case).
This resulted in errors like:
```
Client error: Json(ErrorImpl { code: Message("invalid type: string
\"317727377985634305\", expected identifier"), line: 1, column: 100 })
```
Due to this, simple operations such as even connecting a client failed.
(cherry picked from commit 77f462ea2044ef7d2d12fd1289ea75a6a33cb5dd)
Diffstat (limited to 'src/builder')
0 files changed, 0 insertions, 0 deletions