fmt: fmt and clippy

This commit is contained in:
silver 2023-09-11 20:03:56 +01:00
parent a745d7631d
commit 974173857c

View file

@ -1,4 +1,4 @@
use skynet_discord_bot::{db_init, get_config, Accounts, Config, DataBase, get_server_config_bulk, Servers};
use skynet_discord_bot::{db_init, get_config, get_server_config_bulk, Accounts, Config, DataBase, Servers};
use std::{process, sync::Arc};
use serde::Deserialize;
@ -78,7 +78,6 @@ async fn fetch_accounts(ctx: &Context) {
// get from skynet for the compsoc server only
get_skynet(&db, &config).await;
}
#[derive(Debug, Deserialize)]
@ -90,7 +89,7 @@ async fn get_skynet(db: &Pool<Sqlite>, config: &Config){
let url = format!("{}/ldap/discord?auth={}", &config.ldap_api, &config.auth);
if let Ok(result) = surf::get(url).recv_json::<Vec<SkynetResult>>().await {
for user in result {
add_users_skynet(&db, &config.skynet_server, &user).await;
add_users_skynet(db, &config.skynet_server, &user).await;
}
}
}
@ -131,10 +130,10 @@ async fn get_wolves(db: &Pool<Sqlite>){
} = server_config;
// get the data here
let mut result: Vec<WolvesResult> = vec![];
let result: Vec<WolvesResult> = vec![];
for user in result {
add_users_wolves(&db, &server, &user).await;
add_users_wolves(db, &server, &user).await;
}
}
}