DEV Community

Discussion on: Creating a 'paged' Vec in Rust

Collapse
 
dorrandir profile image
dorrandir

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

Collapse
 
kdrakon profile image
Sean Policarpio

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