22
33use std:: fmt;
44use std:: fs:: File ;
5- use std:: io:: { stderr , BufRead , BufReader , Write } ;
5+ use std:: io:: { BufRead , BufReader , Write , stderr } ;
66use std:: path:: Path ;
77use xml:: reader:: ParserConfig2 ;
88
@@ -940,12 +940,11 @@ fn skip() {
940940 assert_eq ! ( Ok ( XmlEvent :: EndElement { name: OwnedName :: local( "a" . to_string( ) ) } ) , reader. next( ) ) ;
941941 assert_eq ! ( Ok ( XmlEvent :: EndDocument ) , reader. next( ) ) ;
942942 break ' outer;
943- } else {
944- // Should never see the "c" element, since it should be skipped!
945- assert_ne ! ( name. local_name, "c" ) ;
946- // Should never see the "d" element, since it should be skipped!
947- assert_ne ! ( name. local_name, "d" ) ;
948943 }
944+ // Should never see the "c" element, since it should be skipped!
945+ assert_ne ! ( name. local_name, "c" ) ;
946+ // Should never see the "d" element, since it should be skipped!
947+ assert_ne ! ( name. local_name, "d" ) ;
949948 }
950949 XmlEvent :: EndElement { name, .. } => {
951950 // Should never see the "c" element, since it should be skipped!
@@ -966,7 +965,7 @@ fn skip() {
966965
967966struct Name < ' a > ( & ' a OwnedName ) ;
968967
969- impl < ' a > fmt:: Display for Name < ' a > {
968+ impl fmt:: Display for Name < ' _ > {
970969 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
971970 if let Some ( ref namespace) = self . 0 . namespace {
972971 write ! ( f, "{{{namespace}}}" ) ?;
@@ -982,7 +981,7 @@ impl<'a> fmt::Display for Name<'a> {
982981
983982struct Event < ' a > ( & ' a Result < XmlEvent > ) ;
984983
985- impl < ' a > fmt:: Display for Event < ' a > {
984+ impl fmt:: Display for Event < ' _ > {
986985 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
987986 let empty = String :: new ( ) ;
988987 match * self . 0 {
0 commit comments