@@ -17,11 +17,9 @@ use super::{
1717use tokenizer:: { BencodeToken , Tokenizer } ;
1818
1919use crate :: {
20- parsers:: {
21- error:: { self , ReadContext , WriteContext } ,
22- tokenizer,
23- } ,
20+ error:: { self , ReadContext , WriteContext } ,
2421 rw:: { byte_writer:: ByteWriter , string_writer:: StringWriter , writer:: Writer } ,
22+ tokenizer,
2523} ;
2624
2725pub struct BencodeParser < R : Read > {
@@ -355,10 +353,10 @@ mod tests {
355353
356354 use std:: io:: { self , Read } ;
357355
358- use crate :: parsers :: generators:: json:: BencodeParser ;
356+ use crate :: generators:: json:: BencodeParser ;
359357
360358 mod it_should_allow_writing {
361- use crate :: parsers :: generators:: json:: BencodeParser ;
359+ use crate :: generators:: json:: BencodeParser ;
362360
363361 #[ test]
364362 fn to_any_type_implementing_io_write_trait ( ) {
@@ -411,7 +409,7 @@ mod tests {
411409
412410 mod it_should_allow_special_bencode_cases {
413411
414- use crate :: { parsers :: generators:: json:: BencodeParser , test:: bencode_to_json_unchecked} ;
412+ use crate :: { generators:: json:: BencodeParser , test:: bencode_to_json_unchecked} ;
415413
416414 #[ test]
417415 fn an_empty_input ( ) {
@@ -448,10 +446,7 @@ mod tests {
448446 mod it_should_fail {
449447 use std:: io:: { self , Read } ;
450448
451- use crate :: {
452- parsers:: { error:: Error , generators:: json:: BencodeParser } ,
453- try_bencode_to_json,
454- } ;
449+ use crate :: { error:: Error , generators:: json:: BencodeParser , try_bencode_to_json} ;
455450
456451 #[ test]
457452 fn when_there_is_a_problem_reading_from_input ( ) {
@@ -548,7 +543,7 @@ mod tests {
548543 }
549544
550545 mod should_fail {
551- use crate :: { parsers :: error:: Error , try_bencode_to_json} ;
546+ use crate :: { error:: Error , try_bencode_to_json} ;
552547
553548 #[ test]
554549 fn when_it_finds_an_invalid_byte ( ) {
@@ -754,7 +749,7 @@ mod tests {
754749 }
755750
756751 mod it_should_fail_parsing_when {
757- use crate :: { parsers :: error:: Error , try_bencode_to_json} ;
752+ use crate :: { error:: Error , try_bencode_to_json} ;
758753
759754 #[ test]
760755 fn it_reaches_the_end_of_the_input_parsing_the_string_length ( ) {
@@ -1327,7 +1322,7 @@ mod tests {
13271322 }
13281323
13291324 mod should_fail {
1330- use crate :: { parsers :: error:: Error , try_bencode_to_json} ;
1325+ use crate :: { error:: Error , try_bencode_to_json} ;
13311326
13321327 #[ test]
13331328 fn when_an_empty_list_does_not_have_the_matching_close_byte ( ) {
@@ -1920,7 +1915,7 @@ mod tests {
19201915 }
19211916
19221917 mod should_fail {
1923- use crate :: { parsers :: error:: Error , try_bencode_to_json} ;
1918+ use crate :: { error:: Error , try_bencode_to_json} ;
19241919
19251920 #[ test]
19261921 fn when_an_empty_dict_does_not_have_the_matching_close_byte ( ) {
@@ -1998,8 +1993,8 @@ mod tests {
19981993 }
19991994
20001995 mod when_the_field_key_is_not_a_string_for_example {
2001- use crate :: parsers :: error:: Error ;
2002- use crate :: parsers :: generators:: json:: BencodeType ;
1996+ use crate :: error:: Error ;
1997+ use crate :: generators:: json:: BencodeType ;
20031998 use crate :: try_bencode_to_json;
20041999
20052000 #[ test]
0 commit comments