ratatui-org / ratatui

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

perf(layout): avoid allocating memory when using split ergonomic utils #1105

Closed tranzystorekk closed 2 months ago

tranzystorekk commented 2 months ago

Noticed we create an intermediate vec in Layout::areas and Layout::spacers but there's no need for one.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.2%. Comparing base (eb281df) to head (2fa664a).

Files Patch % Lines
src/layout/layout.rs 50.0% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1105 +/- ## ===================================== Coverage 94.2% 94.2% ===================================== Files 61 61 Lines 14587 14587 ===================================== Hits 13751 13751 Misses 836 836 ```

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