mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 01:00:49 +00:00
Cargo clippy & format
This commit is contained in:
parent
cdd85dae71
commit
c5f46dd7fe
22 changed files with 79 additions and 87 deletions
|
@ -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| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue