Skip to content

Commit 02e03e9

Browse files
committed
Fix deprecation warnings on libserialize tests
1 parent 3e6b29f commit 02e03e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libserialize/json.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,7 @@ mod tests {
25172517
#[test]
25182518
fn test_from_str_trait() {
25192519
let s = "null";
2520-
assert!(::std::str::from_str::<Json>(s).unwrap() == from_str(s).unwrap());
2520+
assert!(s.parse::<Json>().unwrap() == s.parse().unwrap());
25212521
}
25222522

25232523
#[test]
@@ -3729,8 +3729,8 @@ mod tests {
37293729
let array3 = Array(vec!(U64(1), U64(2), U64(3)));
37303730
let object = {
37313731
let mut tree_map = BTreeMap::new();
3732-
tree_map.insert("a".into_string(), U64(1));
3733-
tree_map.insert("b".into_string(), U64(2));
3732+
tree_map.insert("a".to_string(), U64(1));
3733+
tree_map.insert("b".to_string(), U64(2));
37343734
Object(tree_map)
37353735
};
37363736

@@ -3762,8 +3762,8 @@ mod tests {
37623762
assert_eq!((vec![1u, 2]).to_json(), array2);
37633763
assert_eq!(vec!(1u, 2, 3).to_json(), array3);
37643764
let mut tree_map = BTreeMap::new();
3765-
tree_map.insert("a".into_string(), 1u);
3766-
tree_map.insert("b".into_string(), 2);
3765+
tree_map.insert("a".to_string(), 1u);
3766+
tree_map.insert("b".to_string(), 2);
37673767
assert_eq!(tree_map.to_json(), object);
37683768
let mut hash_map = HashMap::new();
37693769
hash_map.insert("a".to_string(), 1u);

0 commit comments

Comments
 (0)