@@ -34,15 +34,15 @@ pub struct OpEncoder {
3434 /// This is `Some` if fuel metering is enabled, otherwise `None`.
3535 fuel_costs : Option < FuelCostsProvider > ,
3636 /// The list of constructed instructions and their parameters.
37- instrs : Vec < Op > ,
37+ ops : Vec < Op > ,
3838}
3939
4040impl ReusableAllocations for OpEncoder {
4141 type Allocations = OpEncoderAllocations ;
4242
4343 fn into_allocations ( self ) -> Self :: Allocations {
4444 Self :: Allocations {
45- instrs : self . instrs ,
45+ instrs : self . ops ,
4646 }
4747 }
4848}
@@ -69,7 +69,7 @@ impl OpEncoder {
6969 . then ( || config. fuel_costs ( ) )
7070 . cloned ( ) ;
7171 Self {
72- instrs : alloc. instrs ,
72+ ops : alloc. instrs ,
7373 fuel_costs,
7474 last : None ,
7575 }
@@ -78,7 +78,7 @@ impl OpEncoder {
7878 /// Returns the next [`Instr`].
7979 #[ must_use]
8080 pub fn next_instr ( & self ) -> Instr {
81- Instr :: from_usize ( self . instrs . len ( ) )
81+ Instr :: from_usize ( self . ops . len ( ) )
8282 }
8383
8484 /// Pushes an [`Op::ConsumeFuel`] instruction to `self`.
@@ -111,7 +111,7 @@ impl OpEncoder {
111111 /// Pushes a non-parameter [`Op`] to the [`OpEncoder`].
112112 fn push_instr_impl ( & mut self , instruction : Op ) -> Result < Instr , Error > {
113113 let instr = self . next_instr ( ) ;
114- self . instrs . push ( instruction) ;
114+ self . ops . push ( instruction) ;
115115 self . last = Some ( instr) ;
116116 Ok ( instr)
117117 }
@@ -221,7 +221,7 @@ impl OpEncoder {
221221 ///
222222 /// The parameter is associated to the last pushed [`Op`].
223223 pub fn push_param ( & mut self , instruction : Op ) {
224- self . instrs . push ( instruction) ;
224+ self . ops . push ( instruction) ;
225225 }
226226
227227 /// Returns a shared reference to the [`Op`] associated to [`Instr`].
@@ -230,7 +230,7 @@ impl OpEncoder {
230230 ///
231231 /// If `instr` is out of bounds for `self`.
232232 pub fn get ( & self , instr : Instr ) -> & Op {
233- & self . instrs [ instr. into_usize ( ) ]
233+ & self . ops [ instr. into_usize ( ) ]
234234 }
235235
236236 /// Returns an exclusive reference to the [`Op`] associated to [`Instr`].
@@ -239,7 +239,7 @@ impl OpEncoder {
239239 ///
240240 /// If `instr` is out of bounds for `self`.
241241 fn get_mut ( & mut self , instr : Instr ) -> & mut Op {
242- & mut self . instrs [ instr. into_usize ( ) ]
242+ & mut self . ops [ instr. into_usize ( ) ]
243243 }
244244
245245 /// Resets the [`Instr`] last created via [`OpEncoder::push_instr`].
@@ -303,7 +303,7 @@ impl OpEncoder {
303303 /// The [`OpEncoder`] will be empty after this operation.
304304 pub fn drain ( & mut self ) -> OpEncoderIter < ' _ > {
305305 OpEncoderIter {
306- iter : self . instrs . drain ( ..) ,
306+ iter : self . ops . drain ( ..) ,
307307 }
308308 }
309309
0 commit comments