mgeisler / textwrap

An efficient and powerful Rust library for word wrapping text.
MIT License
446 stars 44 forks source link

core: avoid spurious f64 cast and comparison #540

Closed lucab closed 2 months ago

lucab commented 2 months ago

This tweaks break_words() logic by dropping a cast to f64 and a float comparison, directly using the integer width value instead.

lucab commented 2 months ago

/cc @mgeisler for review.

mgeisler commented 2 months ago

Thanks, looks great!

Let me fix the broken test so I can merge this.