Skip to content

Commit fcf7323

Browse files
committed
---
yaml --- r: 161659 b: refs/heads/snap-stage3 c: f102123 h: refs/heads/master i: 161657: f77f338 161655: 0b0e53c v: v3
1 parent f47c0c4 commit fcf7323

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ca4f53655e82a0a0e1d613b16108720bb7a50fde
4+
refs/heads/snap-stage3: f102123b659911dbee25bbe518d73d66185bb978
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libserialize/json.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,10 +1974,7 @@ macro_rules! read_primitive {
19741974
}
19751975
}
19761976
Json::F64(f) => {
1977-
match num::cast(f) {
1978-
Some(f) => Ok(f),
1979-
None => Err(ExpectedError("Number".to_string(), format!("{}", f))),
1980-
}
1977+
Err(ExpectedError("Integer".to_string(), format!("{}", f)))
19811978
}
19821979
Json::String(s) => {
19831980
// re: #12967.. a type w/ numeric keys (ie HashMap<uint, V> etc)
@@ -2830,6 +2827,9 @@ mod tests {
28302827

28312828
let v: i64 = super::decode("9223372036854775807").unwrap();
28322829
assert_eq!(v, i64::MAX);
2830+
2831+
let res: DecodeResult<i64> = super::decode("765.25252");
2832+
assert_eq!(res, Err(ExpectedError("Integer".into_string(), "765.25252".into_string())));
28332833
}
28342834

28352835
#[test]

0 commit comments

Comments
 (0)