@@ -10,7 +10,6 @@ use crate::mem;
1010use crate :: num:: flt2dec;
1111use crate :: ops:: Deref ;
1212use crate :: result;
13- use crate :: slice;
1413use crate :: str;
1514
1615mod builders;
@@ -234,7 +233,6 @@ pub struct Formatter<'a> {
234233 precision : Option < usize > ,
235234
236235 buf : & ' a mut ( dyn Write + ' a ) ,
237- curarg : slice:: Iter < ' a , ArgumentV1 < ' a > > ,
238236 args : & ' a [ ArgumentV1 < ' a > ] ,
239237}
240238
@@ -1044,7 +1042,6 @@ pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result {
10441042 align : rt:: v1:: Alignment :: Unknown ,
10451043 fill : ' ' ,
10461044 args : args. args ,
1047- curarg : args. args . iter ( ) ,
10481045 } ;
10491046
10501047 let mut idx = 0 ;
@@ -1117,7 +1114,6 @@ impl<'a> Formatter<'a> {
11171114
11181115 // These only exist in the struct for the `run` method,
11191116 // which won’t be used together with this method.
1120- curarg : self . curarg . clone ( ) ,
11211117 args : self . args ,
11221118 }
11231119 }
@@ -1134,9 +1130,17 @@ impl<'a> Formatter<'a> {
11341130 self . precision = self . getcount ( & arg. format . precision ) ;
11351131
11361132 // Extract the correct argument
1137- let value = match arg. position {
1138- rt:: v1:: Position :: Next => * self . curarg . next ( ) . unwrap ( ) ,
1139- rt:: v1:: Position :: At ( i) => self . args [ i] ,
1133+ let value = {
1134+ #[ cfg( bootstrap) ]
1135+ {
1136+ match arg. position {
1137+ rt:: v1:: Position :: At ( i) => self . args [ i] ,
1138+ }
1139+ }
1140+ #[ cfg( not( bootstrap) ) ]
1141+ {
1142+ self . args [ arg. position ]
1143+ }
11401144 } ;
11411145
11421146 // Then actually do some printing
@@ -1148,7 +1152,6 @@ impl<'a> Formatter<'a> {
11481152 rt:: v1:: Count :: Is ( n) => Some ( n) ,
11491153 rt:: v1:: Count :: Implied => None ,
11501154 rt:: v1:: Count :: Param ( i) => self . args [ i] . as_usize ( ) ,
1151- rt:: v1:: Count :: NextParam => self . curarg . next ( ) ?. as_usize ( ) ,
11521155 }
11531156 }
11541157
0 commit comments