@@ -849,7 +849,6 @@ fn test_as_null(){
849
849
#[ test]
850
850
fn test_encode_hashmap_with_numeric_key ( ) {
851
851
use std:: str:: from_utf8;
852
- use std:: collections:: HashMap ;
853
852
let mut hm: HashMap < usize , bool > = HashMap :: new ( ) ;
854
853
hm. insert ( 1 , true ) ;
855
854
let mut mem_buf = Vec :: new ( ) ;
@@ -864,7 +863,6 @@ fn test_encode_hashmap_with_numeric_key() {
864
863
#[ test]
865
864
fn test_prettyencode_hashmap_with_numeric_key ( ) {
866
865
use std:: str:: from_utf8;
867
- use std:: collections:: HashMap ;
868
866
let mut hm: HashMap < usize , bool > = HashMap :: new ( ) ;
869
867
hm. insert ( 1 , true ) ;
870
868
let mut mem_buf = Vec :: new ( ) ;
@@ -930,7 +928,6 @@ fn test_prettyencoder_indent_level_param() {
930
928
931
929
#[ test]
932
930
fn test_hashmap_with_enum_key ( ) {
933
- use std:: collections:: HashMap ;
934
931
#[ derive( RustcEncodable , Eq , Hash , PartialEq , RustcDecodable , Debug ) ]
935
932
enum Enum {
936
933
Foo ,
@@ -947,7 +944,6 @@ fn test_hashmap_with_enum_key() {
947
944
948
945
#[ test]
949
946
fn test_hashmap_with_numeric_key_can_handle_double_quote_delimited_key ( ) {
950
- use std:: collections:: HashMap ;
951
947
let json_str = "{\" 1\" :true}" ;
952
948
let json_obj = match from_str ( json_str) {
953
949
Err ( _) => panic ! ( "Unable to parse json_str: {:?}" , json_str) ,
@@ -959,7 +955,6 @@ fn test_hashmap_with_numeric_key_can_handle_double_quote_delimited_key() {
959
955
960
956
#[ test]
961
957
fn test_hashmap_with_numeric_key_will_error_with_string_keys ( ) {
962
- use std:: collections:: HashMap ;
963
958
let json_str = "{\" a\" :true}" ;
964
959
let json_obj = match from_str ( json_str) {
965
960
Err ( _) => panic ! ( "Unable to parse json_str: {:?}" , json_str) ,
@@ -1267,7 +1262,6 @@ fn test_to_json() {
1267
1262
1268
1263
#[ test]
1269
1264
fn test_encode_hashmap_with_arbitrary_key ( ) {
1270
- use std:: collections:: HashMap ;
1271
1265
#[ derive( PartialEq , Eq , Hash , RustcEncodable ) ]
1272
1266
struct ArbitraryType ( usize ) ;
1273
1267
let mut hm: HashMap < ArbitraryType , bool > = HashMap :: new ( ) ;
0 commit comments