Creating a 'paged' Vec in Rust

Sean Policarpio on May 24, 2019

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 ... [Read Full]
markdown guide
 

Isn't (index as f32 / self.page_length as f32).floor() as usize always equal to index / self.page_legth?

 

You are partially correct; I've updated the post after some Reddit Rust devs pointed out a mistake there.

code of conduct - report abuse