File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
branches/snap-stage3/src/libserialize Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: ca4f53655e82a0a0e1d613b16108720bb7a50fde
4
+ refs/heads/snap-stage3: f102123b659911dbee25bbe518d73d66185bb978
5
5
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
Original file line number Diff line number Diff line change @@ -1974,10 +1974,7 @@ macro_rules! read_primitive {
1974
1974
}
1975
1975
}
1976
1976
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) ) )
1981
1978
}
1982
1979
Json :: String ( s) => {
1983
1980
// re: #12967.. a type w/ numeric keys (ie HashMap<uint, V> etc)
@@ -2830,6 +2827,9 @@ mod tests {
2830
2827
2831
2828
let v: i64 = super :: decode ( "9223372036854775807" ) . unwrap ( ) ;
2832
2829
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( ) ) ) ) ;
2833
2833
}
2834
2834
2835
2835
#[ test]
You can’t perform that action at this time.
0 commit comments