Cargo clippy & format

This commit is contained in:
Natsu Kagami 2025-05-13 00:47:18 +02:00
parent cdd85dae71
commit c5f46dd7fe
Signed by: nki
GPG key ID: 55A032EB38B49ADB
22 changed files with 79 additions and 87 deletions

View file

@ -40,7 +40,7 @@ async fn list(ctx: &Context, m: &Message, _: Args) -> CommandResult {
.filter_map(|(_, role)| roles.get(&role.id).cloned().map(|r| (r, role.description)))
.collect();
const ROLES_PER_PAGE: usize = 8;
let pages = (roles.len() + ROLES_PER_PAGE - 1) / ROLES_PER_PAGE;
let pages = roles.len().div_ceil(ROLES_PER_PAGE);
paginate_reply(
paginate_from_fn(|page, btns| {