From 76ca679e89cd7f431652e06892b791b5f8c43cf9 Mon Sep 17 00:00:00 2001 From: Chet Gurevitch Date: Wed, 11 Oct 2017 18:52:23 -0700 Subject: Update bitflags to v1 --- src/term/cell.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/term/cell.rs') 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 { 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 { 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)); } -- cgit v1.2.3-54-g00ecf