In this post I'll show you some code I wrote for paginating over a Vec collection in Rust. I needed this for a CLI tool I wrote which was meant to ...
For further actions, you may consider blocking this person and/or reporting abuse
Isn't
(index as f32 / self.page_length as f32).floor() as usize
always equal toindex / self.page_legth
?You are partially correct; I've updated the post after some Reddit Rust devs pointed out a mistake there.