summaryrefslogtreecommitdiff
path: root/src/term/cell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/term/cell.rs')
-rw-r--r--src/term/cell.rs19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/term/cell.rs b/src/term/cell.rs
index 88f9d7a1..4d2f4c1c 100644
--- a/src/term/cell.rs
+++ b/src/term/cell.rs
@@ -13,7 +13,7 @@
// limitations under the License.
use bitflags::bitflags;
-use crate::ansi::{NamedColor, Color};
+use crate::ansi::{Color, NamedColor};
use crate::grid::{self, GridCell};
use crate::index::Column;
@@ -47,19 +47,14 @@ pub struct Cell {
pub fg: Color,
pub bg: Color,
pub flags: Flags,
- #[serde(default="default_extra")]
+ #[serde(default = "default_extra")]
pub extra: [char; MAX_ZEROWIDTH_CHARS],
}
impl Default for Cell {
fn default() -> Cell {
- Cell::new(
- ' ',
- Color::Named(NamedColor::Foreground),
- Color::Named(NamedColor::Background)
- )
+ Cell::new(' ', Color::Named(NamedColor::Foreground), Color::Named(NamedColor::Background))
}
-
}
impl GridCell for Cell {
@@ -130,13 +125,7 @@ impl Cell {
}
pub fn new(c: char, fg: Color, bg: Color) -> Cell {
- Cell {
- extra: [' '; MAX_ZEROWIDTH_CHARS],
- c,
- bg,
- fg,
- flags: Flags::empty(),
- }
+ Cell { extra: [' '; MAX_ZEROWIDTH_CHARS], c, bg, fg, flags: Flags::empty() }
}
#[inline]