mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-15 03:38:56 -05:00
correct arithmetic adjustments
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
16a98b0683
commit
321e197d8c
12 changed files with 24 additions and 53 deletions
|
|
@ -22,7 +22,7 @@ pub(crate) async fn list(_body: Vec<&str>, page: Option<usize>) -> Result<RoomMe
|
|||
|
||||
let rooms = rooms
|
||||
.into_iter()
|
||||
.skip(page.saturating_sub(1) * PAGE_SIZE)
|
||||
.skip(page.saturating_sub(1).saturating_mul(PAGE_SIZE))
|
||||
.take(PAGE_SIZE)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue