From 0a190cdde68f533086e029337fde07b74cd7147d Mon Sep 17 00:00:00 2001 From: necrashter Date: Sat, 23 Apr 2022 23:02:13 +0300 Subject: Comply with Rustfmt --- src/config.rs | 2 -- src/db.rs | 18 +++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 0584c31..297e587 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,7 +6,6 @@ use log::{error, info}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; - /// Configuration struct for a single bot #[derive(Debug, Serialize, Deserialize, Clone, Default)] pub struct BotConfig { @@ -14,7 +13,6 @@ pub struct BotConfig { pub starting_balance: u16, } - /// Configuration for a single network #[derive(Debug, Serialize, Deserialize, Clone, Default)] pub struct Config { diff --git a/src/db.rs b/src/db.rs index 6befa2d..bfa4156 100644 --- a/src/db.rs +++ b/src/db.rs @@ -142,15 +142,19 @@ fn read_users(config_name: &str) -> io::Result> { fn get_bots(bot_configs: &HashMap) -> HashMap { let mut index = 0; - bot_configs.iter() + bot_configs + .iter() .map(|(fingerprint, config)| { index += 1; - (fingerprint.to_string(), User { - user_id: MetuId::new(format!("friend_{}", index), "not_used".to_owned()), - public_key: "not_used".to_owned(), - balance: config.starting_balance, - is_bot: true, - }) + ( + fingerprint.to_string(), + User { + user_id: MetuId::new(format!("friend_{}", index), "not_used".to_owned()), + public_key: "not_used".to_owned(), + balance: config.starting_balance, + is_bot: true, + }, + ) }) .collect() } -- cgit v1.2.3-70-g09d2