From 6c4e45f3a69c71958e65fae9a15f82d0c5a27742 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 28 Jul 2020 13:00:55 +0300 Subject: Bump minimum supported Rust version to 1.43.0 --- alacritty_terminal/src/term/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'alacritty_terminal/src/term/mod.rs') diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index ef61ebdf..7a409e2e 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -425,9 +425,11 @@ impl<'a, C> Iterator for RenderableCellsIter<'a, C> { // Apply cursor color, or invert the cursor if it has a fixed background close // to the cell's background. - match self.cursor.cursor_color { - CellRgb::Rgb(color) if color.contrast(cell.bg) < MIN_CURSOR_CONTRAST => (), - _ => cell.fg = self.cursor.cursor_color.color(cell.fg, cell.bg), + if !matches!( + self.cursor.cursor_color, + CellRgb::Rgb(color) if color.contrast(cell.bg) < MIN_CURSOR_CONTRAST + ) { + cell.fg = self.cursor.cursor_color.color(cell.fg, cell.bg); } return Some(cell); -- cgit v1.2.3-54-g00ecf