diff options
| author | Barosl Lee <vcs@barosl.com> | 2014-11-24 03:00:10 +0900 |
|---|---|---|
| committer | Barosl Lee <vcs@barosl.com> | 2014-12-08 18:02:12 +0900 |
| commit | f102123b659911dbee25bbe518d73d66185bb978 (patch) | |
| tree | 35bfc3b87828ebc9f2f041c3e6a978ec185b1ca0 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | ca4f53655e82a0a0e1d613b16108720bb7a50fde (diff) | |
| download | rust-f102123b659911dbee25bbe518d73d66185bb978.tar.gz rust-f102123b659911dbee25bbe518d73d66185bb978.zip | |
libserialize: Do not coerce to integer when decoding a float value
When an integral value is expected by the user but a fractional value is found, the current implementation uses std::num::cast() to coerce to an integer type, losing the fractional part. This behavior is not desirable because the number loses precision without notice. This commit makes it raise ExpectedError when such a situation arises. [breaking-change]
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
