Skip to content

Commit

Permalink
chore: add more CompactString::const_new instead of new (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka authored Jul 16, 2024
1 parent 6d210b3 commit 7bab9f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/buffer/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Cell {
///
/// This works at compile time and puts the symbol onto the stack. Fails to build when the
/// symbol doesnt fit onto the stack and requires to be placed on the heap. Use
/// `Self::default().set_symbol()` in that case. See [`CompactString::new_inline`] for more
/// `Self::default().set_symbol()` in that case. See [`CompactString::const_new`] for more
/// details on this.
pub const fn new(symbol: &'static str) -> Self {
Self {
Expand Down Expand Up @@ -139,7 +139,7 @@ impl Cell {

/// Resets the cell to the empty state.
pub fn reset(&mut self) {
self.symbol = CompactString::new(" ");
self.symbol = CompactString::const_new(" ");
self.fg = Color::Reset;
self.bg = Color::Reset;
#[cfg(feature = "underline-color")]
Expand Down Expand Up @@ -167,7 +167,7 @@ mod tests {
assert_eq!(
cell,
Cell {
symbol: CompactString::new("あ"),
symbol: CompactString::const_new("あ"),
fg: Color::Reset,
bg: Color::Reset,
#[cfg(feature = "underline-color")]
Expand Down

0 comments on commit 7bab9f0

Please sign in to comment.