ratatui-org / ratatui

Rust library that's all about cooking up terminal user interfaces (TUIs) 👨‍🍳🐀
https://ratatui.rs
MIT License
8.82k stars 263 forks source link

refactor: simplify WordWrapper implementation #1193

Closed tranzystorekk closed 1 week ago

tranzystorekk commented 1 week ago

The WordWrapper implementation is a large and almost unreadable chunk of code, so I decided to do a ground-up cleaning.

Highlights and notes in no particular order:

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 99.06542% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.4%. Comparing base (3f2f2cd) to head (76a368a). Report is 5 commits behind head on main.

Files Patch % Lines
src/widgets/reflow.rs 99.0% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1193 +/- ## ===================================== Coverage 94.4% 94.4% ===================================== Files 62 62 Lines 14941 15000 +59 ===================================== + Hits 14110 14169 +59 Misses 831 831 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tranzystorekk commented 1 week ago

Went ahead and applied changes to resolve the most obvious comments

joshka commented 1 week ago

Thanks for the PR!