File tree Expand file tree Collapse file tree
crates/lean_vm/src/tables Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,16 +42,17 @@ impl<const BUS: bool> TableT for ExecutionTable<BUS> {
4242 ]
4343 }
4444
45+ #[ allow( clippy:: vec_init_then_push) ] // https://github.com/leanEthereum/leanMultisig/issues/198
4546 fn bus ( & self ) -> Bus {
47+ let mut data = Vec :: with_capacity ( 4 ) ;
48+ data. push ( BusData :: Column ( COL_PRECOMPILE_DATA ) ) ;
49+ data. push ( BusData :: Column ( COL_EXEC_NU_A ) ) ;
50+ data. push ( BusData :: Column ( COL_EXEC_NU_B ) ) ;
51+ data. push ( BusData :: Column ( COL_EXEC_NU_C ) ) ;
4652 Bus {
4753 direction : BusDirection :: Push ,
4854 selector : COL_IS_PRECOMPILE ,
49- data : vec ! [
50- BusData :: Column ( COL_PRECOMPILE_DATA ) ,
51- BusData :: Column ( COL_EXEC_NU_A ) ,
52- BusData :: Column ( COL_EXEC_NU_B ) ,
53- BusData :: Column ( COL_EXEC_NU_C ) ,
54- ] ,
55+ data,
5556 }
5657 }
5758
Original file line number Diff line number Diff line change @@ -106,16 +106,17 @@ impl<const BUS: bool> TableT for ExtensionOpPrecompile<BUS> {
106106 ]
107107 }
108108
109+ #[ allow( clippy:: vec_init_then_push) ] // https://github.com/leanEthereum/leanMultisig/issues/198
109110 fn bus ( & self ) -> Bus {
111+ let mut data = Vec :: with_capacity ( 4 ) ;
112+ data. push ( BusData :: Column ( COL_AUX_EXTENSION_OP ) ) ;
113+ data. push ( BusData :: Column ( COL_IDX_A ) ) ;
114+ data. push ( BusData :: Column ( COL_IDX_B ) ) ;
115+ data. push ( BusData :: Column ( COL_IDX_RES ) ) ;
110116 Bus {
111117 direction : BusDirection :: Pull ,
112118 selector : COL_ACTIVATION_FLAG ,
113- data : vec ! [
114- BusData :: Column ( COL_AUX_EXTENSION_OP ) ,
115- BusData :: Column ( COL_IDX_A ) ,
116- BusData :: Column ( COL_IDX_B ) ,
117- BusData :: Column ( COL_IDX_RES ) ,
118- ] ,
119+ data,
119120 }
120121 }
121122
Original file line number Diff line number Diff line change @@ -130,16 +130,17 @@ impl<const BUS: bool> TableT for Poseidon16Precompile<BUS> {
130130 ]
131131 }
132132
133+ #[ allow( clippy:: vec_init_then_push) ] // https://github.com/leanEthereum/leanMultisig/issues/198
133134 fn bus ( & self ) -> Bus {
135+ let mut data = Vec :: with_capacity ( 4 ) ;
136+ data. push ( BusData :: Constant ( POSEIDON_PRECOMPILE_DATA ) ) ;
137+ data. push ( BusData :: Column ( POSEIDON_16_COL_INDEX_INPUT_LEFT ) ) ;
138+ data. push ( BusData :: Column ( POSEIDON_16_COL_INDEX_INPUT_RIGHT ) ) ;
139+ data. push ( BusData :: Column ( POSEIDON_16_COL_INDEX_INPUT_RES ) ) ;
134140 Bus {
135141 direction : BusDirection :: Pull ,
136142 selector : POSEIDON_16_COL_FLAG ,
137- data : vec ! [
138- BusData :: Constant ( POSEIDON_PRECOMPILE_DATA ) ,
139- BusData :: Column ( POSEIDON_16_COL_INDEX_INPUT_LEFT ) ,
140- BusData :: Column ( POSEIDON_16_COL_INDEX_INPUT_RIGHT ) ,
141- BusData :: Column ( POSEIDON_16_COL_INDEX_INPUT_RES ) ,
142- ] ,
143+ data,
143144 }
144145 }
145146
You can’t perform that action at this time.
0 commit comments