diff options
author | Kesavan Yogeswaran <hikes@google.com> | 2022-06-28 00:18:48 -0400 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2022-08-02 16:32:29 +0200 |
commit | 013273775eb217e4ae535047e6e261d0e89895ff (patch) | |
tree | 418ce3a3a330e2e77986556c8ff3096e04716089 /src/env.rs | |
parent | c375cad9ceec5667de4f6924b50e900184d1c17b (diff) |
Use TryInto for more permissive deserialization for integers
* Attempt to convert between integer types using `TryInto`-based
conversions rather than blanket failing for some source and
destination types.
* Use `into_uint` instead of `into_int` in `Value` Deserialize
implementations for unsigned integer types. Previously, we were
converting from signed types to unsigned types using `as`, which can
lead to surprise integer values conversions (#93).
Fixes #352 and #93
(cherry picked from commit 7db2e8bfb46d9364ddc3419d3186b150141cc890)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/env.rs')
0 files changed, 0 insertions, 0 deletions