ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Not using div_ceil #1317

Closed ctm closed 7 months ago

ctm commented 7 months ago

Switch from (m + n - 1) / n to div_ceil(m, n).

When I started writing mb2, div_ceil didn't exist. It's been in Rust since 1.73 (October 5th, 2023), so I should not only start using it, but should do some searches for \- 1.*\).*/ and use them there, too. That regexp won't catch multi-line uses, but I'm not about to write a clippy lint to find them all.

FWIW, my fix for the poor table splitting balance (#1302) needs the functionality of div_ceil, so I just checked to see if it was available yet…

ctm commented 7 months ago

Done in master.