mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 07:04:17 +00:00
perf(cell): use const CompactString::new_inline (#979)
Some minor find when messing around trying to `const` all the things. While `reset()` and `default()` can not be `const` it's still a benefit when their contents are.
This commit is contained in:
parent
88bfb5a430
commit
541f0f9953
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ impl Cell {
|
|||
|
||||
/// Resets the cell to the default state.
|
||||
pub fn reset(&mut self) {
|
||||
self.symbol = CompactString::new(" ");
|
||||
self.symbol = CompactString::new_inline(" ");
|
||||
self.fg = Color::Reset;
|
||||
self.bg = Color::Reset;
|
||||
#[cfg(feature = "underline-color")]
|
||||
|
@ -129,7 +129,7 @@ impl Cell {
|
|||
impl Default for Cell {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
symbol: CompactString::new(" "),
|
||||
symbol: CompactString::new_inline(" "),
|
||||
fg: Color::Reset,
|
||||
bg: Color::Reset,
|
||||
#[cfg(feature = "underline-color")]
|
||||
|
|
Loading…
Reference in a new issue