fmt: clippy and nightly fmt

This commit is contained in:
silver 2025-07-21 00:38:59 +01:00
parent 57d4947edf
commit 9d409e3692
Signed by untrusted user: silver
GPG key ID: 36F93D61BAD3FD7D
20 changed files with 194 additions and 143 deletions

View file

@ -1,8 +1,12 @@
pub mod normal {
use crate::common::database::{DataBase, ServerMembersWolves, Servers, Wolves};
use crate::get_now_iso;
use serenity::client::Context;
use serenity::model::id::{GuildId, RoleId, UserId};
use crate::{
common::database::{DataBase, ServerMembersWolves, Servers, Wolves},
get_now_iso,
};
use serenity::{
client::Context,
model::id::{GuildId, RoleId, UserId},
};
use sqlx::{Pool, Sqlite};
struct RolesChange {
@ -152,21 +156,22 @@ pub mod normal {
// for updating committee members
pub mod committee {
use crate::common::database::{get_channel_from_row, get_role_from_row, DataBase, Wolves};
use crate::common::wolves::committees::Committees;
use crate::Config;
use crate::{
common::{
database::{get_channel_from_row, get_role_from_row, DataBase, Wolves},
wolves::committees::Committees,
},
Config,
};
use serde::{Deserialize, Serialize};
use serenity::all::EditRole;
use serenity::builder::CreateChannel;
use serenity::client::Context;
use serenity::model::channel::ChannelType;
use serenity::model::guild::Member;
use serenity::model::id::ChannelId;
use serenity::model::prelude::RoleId;
use sqlx::sqlite::SqliteRow;
use sqlx::{Error, FromRow, Pool, Row, Sqlite};
use serenity::{
all::EditRole,
builder::CreateChannel,
client::Context,
model::{channel::ChannelType, guild::Member, id::ChannelId, prelude::RoleId},
};
use sqlx::{sqlite::SqliteRow, Error, FromRow, Pool, Row, Sqlite};
use std::collections::HashMap;
use std::sync::Arc;
pub async fn check_committee(ctx: &Context) {
let db_lock = {
@ -187,7 +192,7 @@ pub mod committee {
// because to use it to update a single user we need to pre-get the members of teh server
let mut members = server.members(&ctx, None, None).await.unwrap_or_default();
update_committees(&db, &ctx, &config_global, &mut members).await;
update_committees(&db, ctx, &config_global, &mut members).await;
}
/**
@ -342,11 +347,11 @@ pub mod committee {
for role in &roles_current {
roles_current_id.push(role.id.to_owned());
if !roles_required.contains(&role.id) {
if role.id == committee_member {
if !on_committee {
roles_rem.push(role.id.to_owned());
}
if role.id == committee_member && on_committee {
continue;
}
roles_rem.push(role.id.to_owned());
}
}