File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
chain-libs/chain-impl-mockchain/src
jormungandr/testing/thor/src/fragment Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -398,8 +398,7 @@ mod tests {
398398 let total_election_count: u64 = pools. values ( ) . map ( |y| y. 1 ) . sum ( ) ;
399399 let ideal_election_count_per_pool: f32 =
400400 total_election_count as f32 / leader_election_parameters. pools_count as f32 ;
401- let ideal_election_percentage =
402- ideal_election_count_per_pool / total_election_count as f32 ;
401+ let ideal_election_percentage = ideal_election_count_per_pool / total_election_count as f32 ;
403402 let grace_percentage: f32 = 0.08 ;
404403 println ! (
405404 "ideal percentage: {:.2}, grace_percentage: {:.2}" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ impl UpdateProposalData {
3838 }
3939
4040 pub fn gen_votes ( & self , proposal_id : UpdateProposalId ) -> Vec < UpdateVote > {
41- self . voters . keys ( ) . map ( |id| UpdateVote :: new ( proposal_id, id. clone ( ) ) )
41+ self . voters
42+ . keys ( )
43+ . map ( |id| UpdateVote :: new ( proposal_id, id. clone ( ) ) )
4244 . collect ( )
4345 }
4446}
Original file line number Diff line number Diff line change @@ -291,11 +291,7 @@ impl FragmentBuilder {
291291 choice : & Choice ,
292292 ) -> Fragment {
293293 let inner_wallet = wallet. clone ( ) . into ( ) ;
294- let vote_cast = VoteCast :: new (
295- vote_plan. to_id ( ) ,
296- proposal_index,
297- Payload :: public ( * choice) ,
298- ) ;
294+ let vote_cast = VoteCast :: new ( vote_plan. to_id ( ) , proposal_index, Payload :: public ( * choice) ) ;
299295 self . fragment_factory
300296 . vote_cast ( self . valid_until , & inner_wallet, vote_cast)
301297 }
Original file line number Diff line number Diff line change @@ -135,9 +135,7 @@ impl Reg {
135135 & TransactionMetadatum :: new_bytes ( hex:: decode (
136136 delegation. trim_start_matches ( "0x" ) ,
137137 ) ?)
138- . map_err ( |e| {
139- eyre ! ( format!( "cannot decode delegation key, due to: {e}" ) )
140- } ) ?,
138+ . map_err ( |e| eyre ! ( format!( "cannot decode delegation key, due to: {e}" ) ) ) ?,
141139 ) ;
142140 inner_metadata_list. add ( & TransactionMetadatum :: new_int ( & Int :: new (
143141 & BigNum :: from ( weight) ,
You can’t perform that action at this time.
0 commit comments