Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit ce9c77c

Browse files
committed
Update to rust master
1 parent 5ad3371 commit ce9c77c

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/json.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -3467,7 +3467,7 @@ mod tests {
34673467
let mut map = HashMap::new();
34683468
map.insert(Enum::Foo, 0);
34693469
let result = json::encode(&map).unwrap();
3470-
assert_eq!(&result[], r#"{"Foo":0}"#);
3470+
assert_eq!(result, r#"{"Foo":0}"#);
34713471
let decoded: HashMap<Enum, _> = json::decode(&result).unwrap();
34723472
assert_eq!(map, decoded);
34733473
}
@@ -3790,12 +3790,12 @@ mod tests {
37903790

37913791
assert_eq!(array2.to_json(), array2);
37923792
assert_eq!(object.to_json(), object);
3793-
assert_eq!(3_is.to_json(), I64(3));
3793+
assert_eq!(3_isize.to_json(), I64(3));
37943794
assert_eq!(4_i8.to_json(), I64(4));
37953795
assert_eq!(5_i16.to_json(), I64(5));
37963796
assert_eq!(6_i32.to_json(), I64(6));
37973797
assert_eq!(7_i64.to_json(), I64(7));
3798-
assert_eq!(8_us.to_json(), U64(8));
3798+
assert_eq!(8_usize.to_json(), U64(8));
37993799
assert_eq!(9_u8.to_json(), U64(9));
38003800
assert_eq!(10_u16.to_json(), U64(10));
38013801
assert_eq!(11_u32.to_json(), U64(11));
@@ -3809,22 +3809,22 @@ mod tests {
38093809
assert_eq!(false.to_json(), Boolean(false));
38103810
assert_eq!("abc".to_json(), String("abc".to_string()));
38113811
assert_eq!("abc".to_string().to_json(), String("abc".to_string()));
3812-
assert_eq!((1us, 2us).to_json(), array2);
3813-
assert_eq!((1us, 2us, 3us).to_json(), array3);
3814-
assert_eq!([1us, 2us].to_json(), array2);
3815-
assert_eq!((&[1us, 2us, 3us]).to_json(), array3);
3816-
assert_eq!((vec![1us, 2]).to_json(), array2);
3817-
assert_eq!(vec!(1us, 2, 3).to_json(), array3);
3812+
assert_eq!((1, 2).to_json(), array2);
3813+
assert_eq!((1, 2, 3).to_json(), array3);
3814+
assert_eq!([1, 2].to_json(), array2);
3815+
assert_eq!((&[1, 2, 3]).to_json(), array3);
3816+
assert_eq!((vec![1, 2]).to_json(), array2);
3817+
assert_eq!(vec!(1, 2, 3).to_json(), array3);
38183818
let mut tree_map = BTreeMap::new();
3819-
tree_map.insert("a".to_string(), 1us);
3819+
tree_map.insert("a".to_string(), 1);
38203820
tree_map.insert("b".to_string(), 2);
38213821
assert_eq!(tree_map.to_json(), object);
38223822
let mut hash_map = HashMap::new();
3823-
hash_map.insert("a".to_string(), 1us);
3823+
hash_map.insert("a".to_string(), 1);
38243824
hash_map.insert("b".to_string(), 2);
38253825
assert_eq!(hash_map.to_json(), object);
3826-
assert_eq!(Some(15is).to_json(), I64(15));
3827-
assert_eq!(Some(15us).to_json(), U64(15));
3826+
assert_eq!(Some(15).to_json(), I64(15));
3827+
assert_eq!(Some(15).to_json(), U64(15));
38283828
assert_eq!(None::<isize>.to_json(), Null);
38293829
}
38303830

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
1616
html_root_url = "http://doc.rust-lang.org/rustc-serialize/")]
1717
#![cfg_attr(test, deny(warnings))]
18-
#![cfg_attr(test, feature(test, hash))]
18+
#![cfg_attr(test, feature(test))]
1919

2020
#[cfg(test)] extern crate test;
2121
#[cfg(test)] extern crate rand;

0 commit comments

Comments
 (0)