Skip to content

Commit 62daa7d

Browse files
committed
---
yaml --- r: 162302 b: refs/heads/auto c: f102123 h: refs/heads/master v: v3
1 parent 49089d5 commit 62daa7d

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
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: ca4f53655e82a0a0e1d613b16108720bb7a50fde
13+
refs/heads/auto: f102123b659911dbee25bbe518d73d66185bb978
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)