diff options
| author | necrashter | 2022-04-23 23:02:13 +0300 |
|---|---|---|
| committer | Yigit Sever | 2022-04-23 23:12:09 +0300 |
| commit | 0a190cdde68f533086e029337fde07b74cd7147d (patch) | |
| tree | db70bdc5aa8a1bd5a5f99500aa84f2e36ac25d26 /src/db.rs | |
| parent | 8f37c8e2fb2914bd11f35ac2c57a22393eab894f (diff) | |
| download | gradecoin-0a190cdde68f533086e029337fde07b74cd7147d.tar.gz gradecoin-0a190cdde68f533086e029337fde07b74cd7147d.tar.bz2 gradecoin-0a190cdde68f533086e029337fde07b74cd7147d.zip | |
Comply with Rustfmt
Diffstat (limited to 'src/db.rs')
| -rw-r--r-- | src/db.rs | 18 |
1 files changed, 11 insertions, 7 deletions
| @@ -142,15 +142,19 @@ fn read_users(config_name: &str) -> io::Result<Vec<PathBuf>> { | |||
| 142 | fn get_bots(bot_configs: &HashMap<Fingerprint, BotConfig>) -> HashMap<Fingerprint, User> { | 142 | fn get_bots(bot_configs: &HashMap<Fingerprint, BotConfig>) -> HashMap<Fingerprint, User> { |
| 143 | let mut index = 0; | 143 | let mut index = 0; |
| 144 | 144 | ||
| 145 | bot_configs.iter() | 145 | bot_configs |
| 146 | .iter() | ||
| 146 | .map(|(fingerprint, config)| { | 147 | .map(|(fingerprint, config)| { |
| 147 | index += 1; | 148 | index += 1; |
| 148 | (fingerprint.to_string(), User { | 149 | ( |
| 149 | user_id: MetuId::new(format!("friend_{}", index), "not_used".to_owned()), | 150 | fingerprint.to_string(), |
| 150 | public_key: "not_used".to_owned(), | 151 | User { |
| 151 | balance: config.starting_balance, | 152 | user_id: MetuId::new(format!("friend_{}", index), "not_used".to_owned()), |
| 152 | is_bot: true, | 153 | public_key: "not_used".to_owned(), |
| 153 | }) | 154 | balance: config.starting_balance, |
| 155 | is_bot: true, | ||
| 156 | }, | ||
| 157 | ) | ||
| 154 | }) | 158 | }) |
| 155 | .collect() | 159 | .collect() |
| 156 | } | 160 | } |
