Skip to content

Commit e61a39c

Browse files
committed
fmt
1 parent 5d4db53 commit e61a39c

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

src/chain-libs/chain-impl-mockchain/src/leadership/genesis/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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}",

src/chain-libs/chain-impl-mockchain/src/testing/arbitrary/update_proposal.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/jormungandr/testing/thor/src/fragment/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff 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
}

src/voting-tools-rs/src/logic.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)