summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/grid/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/grid/mod.rs')
-rw-r--r--alacritty_terminal/src/grid/mod.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs
index 34d989db..37cf0eb6 100644
--- a/alacritty_terminal/src/grid/mod.rs
+++ b/alacritty_terminal/src/grid/mod.rs
@@ -264,11 +264,9 @@ impl<T: GridCell + PartialEq + Copy> Grid<T> {
let mut new_empty_lines = 0;
let mut reversed: Vec<Row<T>> = Vec::with_capacity(self.raw.len());
for (i, mut row) in self.raw.drain().enumerate().rev() {
- // FIXME: Rust 1.39.0+ allows moving in pattern guard here
// Check if reflowing shoud be performed
- let mut last_row = reversed.last_mut();
- let last_row = match last_row {
- Some(ref mut last_row) if should_reflow(last_row) => last_row,
+ let last_row = match reversed.last_mut() {
+ Some(last_row) if should_reflow(last_row) => last_row,
_ => {
reversed.push(row);
continue;
@@ -356,11 +354,9 @@ impl<T: GridCell + PartialEq + Copy> Grid<T> {
}
loop {
- // FIXME: Rust 1.39.0+ allows moving in pattern guard here
// Check if reflowing shoud be performed
- let wrapped = row.shrink(cols);
- let mut wrapped = match wrapped {
- Some(_) if reflow => wrapped.unwrap(),
+ let mut wrapped = match row.shrink(cols) {
+ Some(wrapped) if reflow => wrapped,
_ => {
new_raw.push(row);
break;