mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-28 21:41:49 +00:00

This makes it possible to create constants using the shorthand methods. ```rust const MY_STYLE: Style = Style::new().blue().on_black(); ``` Rather than implementing Styled for Style and then adding extension methods that implement the Stylize shorthands, this implements the methods as const functions directly on Style. BREAKING CHANGE: `Style` no longer implements `Styled`. Any calls to methods implemented by the blanket implementation of Stylize are now defined directly on Style. Remove the Stylize import if it is no longer used by your code. The `reset()` method does not have a direct replacement, as it clashes with the existing `reset()` method. Use `Style::reset()` rather than `some_style.reset()` Fixes: #1158