summaryrefslogtreecommitdiff
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-05-20 22:23:55 +0300
committerGitHub <noreply@github.com>2022-05-20 22:23:55 +0300
commit9f8c5c4f5659308ee1bb3a22e7d0ca2d04db8874 (patch)
tree3190d3fe789698f7f6b1f96a87e3ac077b50edf9 /alacritty_terminal
parente319ca93a6574fbdeee3f764c4390917f558e3a7 (diff)
downloadalacritty-9f8c5c4f5659308ee1bb3a22e7d0ca2d04db8874.tar.gz
alacritty-9f8c5c4f5659308ee1bb3a22e7d0ca2d04db8874.zip
Enable damage tracking only on Wayland
Other platforms don't have such concepts in general or have them via different interfaces not related to EGL. This commit also resolves some minor clippy issues. Fixes #6051. Co-authored-by: Christian Duerr <contact@christianduerr.com>
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/ansi.rs3
-rw-r--r--alacritty_terminal/src/grid/storage.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index f4e8fde1..b590bd7d 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -1,6 +1,7 @@
//! ANSI Terminal Stream Parsing.
use std::convert::TryFrom;
+use std::fmt::Write;
use std::time::{Duration, Instant};
use std::{iter, str};
@@ -950,7 +951,7 @@ where
for items in params {
buf.push('[');
for item in *items {
- buf.push_str(&format!("{:?},", *item as char));
+ let _ = write!(buf, "{:?}", *item as char);
}
buf.push_str("],");
}
diff --git a/alacritty_terminal/src/grid/storage.rs b/alacritty_terminal/src/grid/storage.rs
index 0b36fef6..6fbc3bf2 100644
--- a/alacritty_terminal/src/grid/storage.rs
+++ b/alacritty_terminal/src/grid/storage.rs
@@ -175,7 +175,7 @@ impl<T> Storage<T> {
/// Rotate the grid, moving all lines up/down in history.
#[inline]
pub fn rotate(&mut self, count: isize) {
- debug_assert!(count.abs() as usize <= self.inner.len());
+ debug_assert!(count.unsigned_abs() <= self.inner.len());
let len = self.inner.len();
self.zero = (self.zero as isize + count + len as isize) as usize % len;