@@ -446,7 +446,7 @@ impl Config {
446446 match ( env:: var ( "TARGET" ) , env:: var ( "HOST" ) ) {
447447 ( Ok ( target) , Ok ( host) ) => {
448448 let kind = if host == target { "HOST" } else { "TARGET" } ;
449- let target_u = target. replace ( "-" , "_" ) ;
449+ let target_u = target. replace ( '-' , "_" ) ;
450450
451451 self . env_var_os ( & format ! ( "{}_{}" , var_base, target) )
452452 . or_else ( || self . env_var_os ( & format ! ( "{}_{}" , var_base, target_u) ) )
@@ -802,8 +802,8 @@ impl Library {
802802 }
803803 }
804804
805- let mut linker_options = words. iter ( ) . filter ( |arg| arg. starts_with ( "-Wl," ) ) ;
806- while let Some ( option) = linker_options. next ( ) {
805+ let linker_options = words. iter ( ) . filter ( |arg| arg. starts_with ( "-Wl," ) ) ;
806+ for option in linker_options {
807807 let mut pop = false ;
808808 let mut ld_option = vec ! [ ] ;
809809 for subopt in option[ 4 ..] . split ( ',' ) {
@@ -829,7 +829,7 @@ impl Library {
829829 }
830830
831831 fn parse_modversion ( & mut self , output : & str ) {
832- self . version . push_str ( output. lines ( ) . nth ( 0 ) . unwrap ( ) . trim ( ) ) ;
832+ self . version . push_str ( output. lines ( ) . next ( ) . unwrap ( ) . trim ( ) ) ;
833833 }
834834}
835835
0 commit comments