diff options
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 | } |