diff options
Diffstat (limited to 'alacritty/src/string.rs')
-rw-r--r-- | alacritty/src/string.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty/src/string.rs b/alacritty/src/string.rs index 092c10e9..4a758b34 100644 --- a/alacritty/src/string.rs +++ b/alacritty/src/string.rs @@ -90,7 +90,7 @@ impl<'a> StrShortener<'a> { } // Consume the iterator to count the number of characters in it. - let num_chars = iter.last().map(|(idx, _)| idx + 1).unwrap_or(offset); + let num_chars = iter.last().map_or(offset, |(idx, _)| idx + 1); let skip_chars = num_chars - offset; let text_action = if num_chars <= max_width || shortener.is_none() { |