fmt: danm formatting

This commit is contained in:
silver 2023-09-26 01:04:07 +01:00
parent 8760f4440a
commit abb00ff8c7
3 changed files with 6 additions and 7 deletions

View file

@ -10,12 +10,12 @@ use serenity::{
use chrono::{Datelike, SecondsFormat, Utc};
use rand::{distributions::Alphanumeric, thread_rng, Rng};
use serenity::model::id::UserId;
use sqlx::{
sqlite::{SqliteConnectOptions, SqlitePoolOptions, SqliteRow},
Error, FromRow, Pool, Row, Sqlite,
};
use std::{env, str::FromStr, sync::Arc};
use serenity::model::id::UserId;
use tokio::sync::RwLock;
pub struct Config {
@ -140,7 +140,7 @@ impl<'r> FromRow<'r, SqliteRow> for ServerMembersWolves {
}
_ => None,
};
Ok(Self {
server,
id_wolves: row.try_get("id_wolves")?,
@ -168,7 +168,7 @@ impl<'r> FromRow<'r, SqliteRow> for Wolves {
}
_ => None,
};
Ok(Self {
id_wolves: row.try_get("id_wolves")?,
email: row.try_get("email")?,
@ -258,8 +258,8 @@ pub async fn db_init(config: &Config) -> Result<Pool<Sqlite>, Error> {
minecraft text
)",
)
.execute(&pool)
.await?;
.execute(&pool)
.await?;
sqlx::query("CREATE INDEX IF NOT EXISTS index_discord ON wolves (discord)").execute(&pool).await?;