diff options
-rw-r--r-- | tests/test_deserialize.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_deserialize.rs b/tests/test_deserialize.rs index 4d44e5e..569be0c 100644 --- a/tests/test_deserialize.rs +++ b/tests/test_deserialize.rs @@ -24,7 +24,7 @@ struct QueryParams { macro_rules! map_test { ($string:expr, $($mapvars:tt)*) => { let expected_map = hash_to_map!(New $($mapvars)*); - let testmap: HashMap<String, _> = qs::from_str($string).unwrap(); + let testmap: HashMap<_, _> = qs::from_str($string).unwrap(); assert_eq!(expected_map, testmap); } } @@ -37,13 +37,13 @@ macro_rules! hash_to_map { //{} // This parses a single map entry, with a value explicitly an expression. ($map:expr, $k:tt[e $v:expr] $($rest:tt)*) => {{ - $map.insert($k.to_string(), $v.to_owned()); + $map.insert($k.to_owned(), $v.to_owned()); hash_to_map!($map, $($rest)*); }}; // This parses a single map entry, plus the rest of the values. ($map:expr, $k:tt[$v:tt] $($rest:tt)*) => {{ - $map.insert($k.to_string(), $v.to_owned()); + $map.insert($k.to_owned(), $v.to_owned()); hash_to_map!($map, $($rest)*); }}; @@ -52,7 +52,7 @@ macro_rules! hash_to_map { ($map:expr, $k:tt[$($inner:tt)*] $($rest:tt)*) => {{ let mut inner_map = HashMap::new(); hash_to_map!(inner_map, $($inner)*); - $map.insert($k.to_string(), inner_map); + $map.insert($k.to_owned(), inner_map); hash_to_map!($map, $($rest)*); }}; |