From d5c0082b537477d2d563f5411b8e625a95817331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Fran=C3=A7a?= Date: Thu, 4 Apr 2024 14:41:46 +0100 Subject: [PATCH] fmt --- node/tools/src/bin/localnet_config.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/node/tools/src/bin/localnet_config.rs b/node/tools/src/bin/localnet_config.rs index 04c45a94..b39d2196 100644 --- a/node/tools/src/bin/localnet_config.rs +++ b/node/tools/src/bin/localnet_config.rs @@ -1,8 +1,7 @@ //! This tool constructs collection of node configs for running tests. use anyhow::Context as _; use clap::Parser; -use rand::seq::SliceRandom as _; -use rand::Rng; +use rand::{seq::SliceRandom as _, Rng}; use std::{ collections::{HashMap, HashSet}, fs, @@ -89,10 +88,12 @@ fn main() -> anyhow::Result<()> { cfgs.shuffle(rng); let mut next = 0; for i in 0..cfgs.len() { - cfgs[i].gossip_static_outbound = (0..peers).map(|_| { - next = (next+1) % nodes; - (cfgs[next].node_key.public(), cfgs[next].public_addr.clone()) - }).collect(); + cfgs[i].gossip_static_outbound = (0..peers) + .map(|_| { + next = (next + 1) % nodes; + (cfgs[next].node_key.public(), cfgs[next].public_addr.clone()) + }) + .collect(); } }