aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/grid/row.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/grid/row.rs')
-rw-r--r--alacritty_terminal/src/grid/row.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty_terminal/src/grid/row.rs b/alacritty_terminal/src/grid/row.rs
index 900d2a76..2a92a78c 100644
--- a/alacritty_terminal/src/grid/row.rs
+++ b/alacritty_terminal/src/grid/row.rs
@@ -76,7 +76,7 @@ impl<T: Clone + Default> Row<T> {
// Split off cells for a new row.
let mut new_row = self.inner.split_off(columns);
- let index = new_row.iter().rposition(|c| !c.is_empty()).map(|i| i + 1).unwrap_or(0);
+ let index = new_row.iter().rposition(|c| !c.is_empty()).map_or(0, |i| i + 1);
new_row.truncate(index);
self.occ = min(self.occ, columns);