Fix deprecation warnings on libserialize tests
This commit is contained in:
parent
3e6b29f8ad
commit
02e03e9d94
@ -2517,7 +2517,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_from_str_trait() {
|
fn test_from_str_trait() {
|
||||||
let s = "null";
|
let s = "null";
|
||||||
assert!(::std::str::from_str::<Json>(s).unwrap() == from_str(s).unwrap());
|
assert!(s.parse::<Json>().unwrap() == s.parse().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -3729,8 +3729,8 @@ mod tests {
|
|||||||
let array3 = Array(vec!(U64(1), U64(2), U64(3)));
|
let array3 = Array(vec!(U64(1), U64(2), U64(3)));
|
||||||
let object = {
|
let object = {
|
||||||
let mut tree_map = BTreeMap::new();
|
let mut tree_map = BTreeMap::new();
|
||||||
tree_map.insert("a".into_string(), U64(1));
|
tree_map.insert("a".to_string(), U64(1));
|
||||||
tree_map.insert("b".into_string(), U64(2));
|
tree_map.insert("b".to_string(), U64(2));
|
||||||
Object(tree_map)
|
Object(tree_map)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3762,8 +3762,8 @@ mod tests {
|
|||||||
assert_eq!((vec![1u, 2]).to_json(), array2);
|
assert_eq!((vec![1u, 2]).to_json(), array2);
|
||||||
assert_eq!(vec!(1u, 2, 3).to_json(), array3);
|
assert_eq!(vec!(1u, 2, 3).to_json(), array3);
|
||||||
let mut tree_map = BTreeMap::new();
|
let mut tree_map = BTreeMap::new();
|
||||||
tree_map.insert("a".into_string(), 1u);
|
tree_map.insert("a".to_string(), 1u);
|
||||||
tree_map.insert("b".into_string(), 2);
|
tree_map.insert("b".to_string(), 2);
|
||||||
assert_eq!(tree_map.to_json(), object);
|
assert_eq!(tree_map.to_json(), object);
|
||||||
let mut hash_map = HashMap::new();
|
let mut hash_map = HashMap::new();
|
||||||
hash_map.insert("a".to_string(), 1u);
|
hash_map.insert("a".to_string(), 1u);
|
||||||
|
Loading…
Reference in New Issue
Block a user