From 155b8d77ba8b41fd2c74101a20c5ebd144325cf9 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Wed, 28 Apr 2021 12:41:10 +0900 Subject: [PATCH] Implement len for beatmapset paging --- youmubot-osu/src/discord/display.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/youmubot-osu/src/discord/display.rs b/youmubot-osu/src/discord/display.rs index cf02cec..725cd26 100644 --- a/youmubot-osu/src/discord/display.rs +++ b/youmubot-osu/src/discord/display.rs @@ -1,5 +1,8 @@ pub use beatmapset::display_beatmapset; +// mod scores { +// } + mod beatmapset { use crate::{ discord::{ @@ -71,6 +74,10 @@ mod beatmapset { #[async_trait] impl pagination::Paginate for Paginate { + fn len(&self) -> Option { + Some(self.maps.len()) + } + async fn render( &mut self, page: u8,