Skip to content

Commit 9d7dc3d

Browse files
committed
fix build
1 parent 272b0e3 commit 9d7dc3d

File tree

11 files changed

+39
-23
lines changed

11 files changed

+39
-23
lines changed

src/chain-libs/chain-storage/src/tests.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,7 @@ fn get_blocks_by_chain_length() {
394394
.into_iter()
395395
.map(|block| Value::owned(block.into_boxed_slice())),
396396
);
397-
let actual = HashSet::from_iter(
398-
store
399-
.get_blocks_by_chain_length(chain_length)
400-
.unwrap(),
401-
);
397+
let actual = HashSet::from_iter(store.get_blocks_by_chain_length(chain_length).unwrap());
402398

403399
assert_eq!(expected, actual);
404400
}

src/jormungandr/testing/hersir/src/builder/settings/wallet.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ impl TryFrom<Wallet> for WalletLib {
152152

153153
fn try_from(wallet: Wallet) -> Result<WalletLib, Error> {
154154
if wallet.inner.is_none() {
155-
return Err(Error::OperationUnavailableForExternalWallet("into WalletLib".to_string()));
155+
return Err(Error::OperationUnavailableForExternalWallet(
156+
"into WalletLib".to_string(),
157+
));
156158
}
157159
Ok(Inner::from(wallet).into())
158160
}

src/jormungandr/testing/thor/src/cli/controller.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,6 @@ impl CliController {
209209
}
210210

211211
pub fn save_config(&self) -> Result<(), Error> {
212-
self.wallets.save_config()}
212+
self.wallets.save_config()
213+
}
213214
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,8 @@ impl FragmentBuilder {
304304
let election_key =
305305
chain_vote::ElectionPublicKey::from_participants(vote_plan.committee_public_keys());
306306

307-
let proposal: &chain_impl_mockchain::certificate::Proposal = vote_plan
308-
.proposals()
309-
.get(proposal_index as usize)
310-
.unwrap();
307+
let proposal: &chain_impl_mockchain::certificate::Proposal =
308+
vote_plan.proposals().get(proposal_index as usize).unwrap();
311309
let options = proposal.options();
312310

313311
let length = options

src/jormungandr/testing/thor/src/wallet/committee/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,6 @@ impl CommitteeDataManager {
221221
},
222222
)
223223
.collect(),
224-
)}
224+
)
225+
}
225226
}

src/vit-testing/iapyx/src/utils/qr.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ pub fn read_qrs<P: AsRef<Path>>(
145145
) -> Vec<Secret> {
146146
let mut secrets = Vec::new();
147147
for (idx, qr) in qrs.iter().enumerate() {
148-
println!("[{}/{}] Decoding {:?}", idx + 1, qrs.len(), qr.as_ref().display());
148+
println!(
149+
"[{}/{}] Decoding {:?}",
150+
idx + 1,
151+
qrs.len(),
152+
qr.as_ref().display()
153+
);
149154

150155
let pin = match pin_read_mode.into_qr_pin_mode(qr).into_qr_pin() {
151156
Ok(pin) => pin,

src/vit-testing/vitup/src/builders/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ impl VitBackendSettingsBuilder {
296296
.collect(),
297297
)
298298
.build()
299-
.into_iter().collect(),
299+
.into_iter()
300+
.collect(),
300301
);
301302

302303
builder = builder.blockchain(blockchain);

src/vit-testing/vitup/src/cli/start/advanced.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,6 @@ impl AdvancedStartCommandArgs {
140140
config.service.version.clone(),
141141
testing_directory,
142142
);
143-
spawn_network(mode, network_spawn_params, &mut template_generator, config)}
143+
spawn_network(mode, network_spawn_params, &mut template_generator, config)
144+
}
144145
}

src/vit-testing/vitup/src/cli/start/quick.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ impl QuickStartCommandArgs {
179179
config_builder = config_builder.use_https();
180180
}
181181

182-
let vote_timestamps = [self.vote_start_timestamp.clone(),
182+
let vote_timestamps = [
183+
self.vote_start_timestamp.clone(),
183184
self.tally_start_timestamp.clone(),
184-
self.tally_end_timestamp.clone()];
185+
self.tally_end_timestamp.clone(),
186+
];
185187

186188
let vote_timestamps_defined = vote_timestamps.iter().filter(|x| x.is_some()).count();
187189
if vote_timestamps_defined < 3 && vote_timestamps_defined > 0 {
@@ -232,5 +234,6 @@ impl QuickStartCommandArgs {
232234
config.service.version.clone(),
233235
testing_directory,
234236
);
235-
spawn_network(mode, network_spawn_params, &mut template_generator, config)}
237+
spawn_network(mode, network_spawn_params, &mut template_generator, config)
238+
}
236239
}

src/vit-testing/vitup/src/mode/mock/rest/vit_ss.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ pub async fn get_challenge_by_id(id: i32, context: ContextLock) -> Result<impl R
140140
.state()
141141
.vit()
142142
.challenges()
143-
.iter().find(|&ch| ch.id == id).cloned()
143+
.iter()
144+
.find(|&ch| ch.id == id)
145+
.cloned()
144146
.ok_or_else(|| HandleError::NotFound(id.to_string()))?;
145147
let proposals: Vec<Proposal> = context
146148
.state()
@@ -175,7 +177,9 @@ pub async fn get_challenge_by_id_and_group_id(
175177
.state()
176178
.vit()
177179
.challenges()
178-
.iter().find(|&ch| ch.id == id).cloned()
180+
.iter()
181+
.find(|&ch| ch.id == id)
182+
.cloned()
179183
.ok_or_else(|| HandleError::NotFound(id.to_string()))?;
180184
let proposals: Vec<Proposal> = context
181185
.state()
@@ -213,7 +217,9 @@ pub async fn get_review_by_id(id: i32, context: ContextLock) -> Result<impl Repl
213217
.state()
214218
.vit()
215219
.advisor_reviews()
216-
.iter().filter(|&review| review.proposal_id == id).cloned()
220+
.iter()
221+
.filter(|&review| review.proposal_id == id)
222+
.cloned()
217223
.group_by(|review| review.assessor.to_string())
218224
.into_iter()
219225
.map(|(key, group)| (key, group.collect::<Vec<_>>()))

0 commit comments

Comments
 (0)