diff options
author | Chet Gurevitch <chetgurevitch@protonmail.com> | 2017-10-11 18:52:23 -0700 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-23 21:39:09 -0800 |
commit | 76ca679e89cd7f431652e06892b791b5f8c43cf9 (patch) | |
tree | f4594990e94f8cfc94d90dd965cd14fe916557bc /src/term/cell.rs | |
parent | ae533e660f649413af15c2a826497de423a5211b (diff) | |
download | alacritty-76ca679e89cd7f431652e06892b791b5f8c43cf9.tar.gz alacritty-76ca679e89cd7f431652e06892b791b5f8c43cf9.zip |
Update bitflags to v1
Diffstat (limited to 'src/term/cell.rs')
-rw-r--r-- | src/term/cell.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/term/cell.rs b/src/term/cell.rs index cc1848d3..7ad2aed0 100644 --- a/src/term/cell.rs +++ b/src/term/cell.rs @@ -59,7 +59,7 @@ impl LineLength for grid::Row<Cell> { fn line_length(&self) -> Column { let mut length = Column(0); - if self[Column(self.len() - 1)].flags.contains(WRAPLINE) { + if self[Column(self.len() - 1)].flags.contains(Flags::WRAPLINE) { return Column(self.len()); } @@ -77,17 +77,17 @@ impl LineLength for grid::Row<Cell> { impl Cell { #[inline] pub fn bold(&self) -> bool { - self.flags.contains(BOLD) + self.flags.contains(Flags::BOLD) } #[inline] pub fn inverse(&self) -> bool { - self.flags.contains(INVERSE) + self.flags.contains(Flags::INVERSE) } #[inline] pub fn dim(&self) -> bool { - self.flags.contains(DIM) + self.flags.contains(Flags::DIM) } pub fn new(c: char, fg: Color, bg: Color) -> Cell { @@ -103,7 +103,7 @@ impl Cell { pub fn is_empty(&self) -> bool { self.c == ' ' && self.bg == Color::Named(NamedColor::Background) && - !self.flags.intersects(INVERSE | UNDERLINE) + !self.flags.intersects(Flags::INVERSE | Flags::UNDERLINE) } #[inline] @@ -133,7 +133,7 @@ mod tests { fn line_length_works_with_wrapline() { let template = Cell::default(); let mut row = Row::new(Column(10), &template); - row[Column(9)].flags.insert(super::WRAPLINE); + row[Column(9)].flags.insert(super::Flags::WRAPLINE); assert_eq!(row.line_length(), Column(10)); } |