summaryrefslogtreecommitdiff
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-02-02 11:30:23 +0300
committerGitHub <noreply@github.com>2023-02-02 11:30:23 +0300
commit1c878a0476257d328113efcd7088f1aa53f42e56 (patch)
treeb4ba30e6b9549965387330f9eb7111c95795de69 /alacritty_terminal
parent246ec8945d84f658fc88d02a33c3590ef4a92e0f (diff)
downloadalacritty-1c878a0476257d328113efcd7088f1aa53f42e56.tar.gz
alacritty-1c878a0476257d328113efcd7088f1aa53f42e56.zip
Update winit to 0.28
Fixes #6644. Fixes #6615. Fixes #6558. Fixes #6515. Fixes #3187. Fixes #62.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/ansi.rs2
-rw-r--r--alacritty_terminal/src/config/scrolling.rs3
-rw-r--r--alacritty_terminal/src/event.rs10
-rw-r--r--alacritty_terminal/src/event_loop.rs2
-rw-r--r--alacritty_terminal/src/term/color.rs5
-rw-r--r--alacritty_terminal/src/term/mod.rs6
-rw-r--r--alacritty_terminal/tests/ref.rs8
7 files changed, 14 insertions, 22 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index ff468ffc..53495995 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -1003,7 +1003,7 @@ where
if let Some(c) = xparse_color(chunk[1]) {
self.handler.set_color(index as usize, c);
} else if chunk[1] == b"?" {
- let prefix = format!("4;{}", index);
+ let prefix = format!("4;{index}");
self.handler.dynamic_color_sequence(prefix, index as usize, terminator);
} else {
unhandled(params);
diff --git a/alacritty_terminal/src/config/scrolling.rs b/alacritty_terminal/src/config/scrolling.rs
index f4e55787..7ff306a9 100644
--- a/alacritty_terminal/src/config/scrolling.rs
+++ b/alacritty_terminal/src/config/scrolling.rs
@@ -49,8 +49,7 @@ impl<'de> Deserialize<'de> for ScrollingHistory {
if lines > MAX_SCROLLBACK_LINES {
Err(SerdeError::custom(format!(
- "exceeded maximum scrolling history ({}/{})",
- lines, MAX_SCROLLBACK_LINES
+ "exceeded maximum scrolling history ({lines}/{MAX_SCROLLBACK_LINES})"
)))
} else {
Ok(Self(lines))
diff --git a/alacritty_terminal/src/event.rs b/alacritty_terminal/src/event.rs
index b592ce1b..4e1d9ec4 100644
--- a/alacritty_terminal/src/event.rs
+++ b/alacritty_terminal/src/event.rs
@@ -57,12 +57,12 @@ pub enum Event {
impl Debug for Event {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
- Event::ClipboardStore(ty, text) => write!(f, "ClipboardStore({:?}, {})", ty, text),
- Event::ClipboardLoad(ty, _) => write!(f, "ClipboardLoad({:?})", ty),
+ Event::ClipboardStore(ty, text) => write!(f, "ClipboardStore({ty:?}, {text})"),
+ Event::ClipboardLoad(ty, _) => write!(f, "ClipboardLoad({ty:?})"),
Event::TextAreaSizeRequest(_) => write!(f, "TextAreaSizeRequest"),
- Event::ColorRequest(index, _) => write!(f, "ColorRequest({})", index),
- Event::PtyWrite(text) => write!(f, "PtyWrite({})", text),
- Event::Title(title) => write!(f, "Title({})", title),
+ Event::ColorRequest(index, _) => write!(f, "ColorRequest({index})"),
+ Event::PtyWrite(text) => write!(f, "PtyWrite({text})"),
+ Event::Title(title) => write!(f, "Title({title})"),
Event::CursorBlinkingChange => write!(f, "CursorBlinkingChange"),
Event::MouseCursorDirty => write!(f, "MouseCursorDirty"),
Event::ResetTitle => write!(f, "ResetTitle"),
diff --git a/alacritty_terminal/src/event_loop.rs b/alacritty_terminal/src/event_loop.rs
index b0877224..34169801 100644
--- a/alacritty_terminal/src/event_loop.rs
+++ b/alacritty_terminal/src/event_loop.rs
@@ -339,7 +339,7 @@ where
if let Err(err) = self.poll.poll(&mut events, timeout) {
match err.kind() {
ErrorKind::Interrupted => continue,
- _ => panic!("EventLoop polling error: {:?}", err),
+ _ => panic!("EventLoop polling error: {err:?}"),
}
}
diff --git a/alacritty_terminal/src/term/color.rs b/alacritty_terminal/src/term/color.rs
index 22b30828..8f193b39 100644
--- a/alacritty_terminal/src/term/color.rs
+++ b/alacritty_terminal/src/term/color.rs
@@ -119,8 +119,7 @@ impl<'de> Deserialize<'de> for Rgb {
{
Rgb::from_str(value).map_err(|_| {
E::custom(format!(
- "failed to parse rgb color {}; expected hex color like #ff00ff",
- value
+ "failed to parse rgb color {value}; expected hex color like #ff00ff"
))
})
}
@@ -222,7 +221,7 @@ impl<'de> Deserialize<'de> for CellRgb {
}
Rgb::from_str(value).map(CellRgb::Rgb).map_err(|_| {
- E::custom(format!("failed to parse color {}; expected {}", value, EXPECTING))
+ E::custom(format!("failed to parse color {value}; expected {EXPECTING}"))
})
}
}
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index e41120da..fe9c7794 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -1169,7 +1169,7 @@ impl<T: EventListener> Handler for Term<T> {
Some('>') => {
trace!("Reporting secondary device attributes");
let version = version_number(env!("CARGO_PKG_VERSION"));
- let text = format!("\x1b[>0;{};1c", version);
+ let text = format!("\x1b[>0;{version};1c");
self.event_proxy.send_event(Event::PtyWrite(text));
},
_ => debug!("Unsupported device attributes intermediate"),
@@ -1944,7 +1944,7 @@ impl<T: EventListener> Handler for Term<T> {
self.event_proxy.send_event(Event::TextAreaSizeRequest(Arc::new(move |window_size| {
let height = window_size.num_lines * window_size.cell_height;
let width = window_size.num_cols * window_size.cell_width;
- format!("\x1b[4;{};{}t", height, width)
+ format!("\x1b[4;{height};{width}t")
})));
}
@@ -2721,7 +2721,7 @@ mod tests {
term.reset_damage();
let vi_cursor_point = term.vi_mode_cursor.point;
let line = vi_cursor_point.line.0 as usize;
- let left = vi_cursor_point.column.0 as usize;
+ let left = vi_cursor_point.column.0;
let right = left;
let mut damaged_lines = match term.damage(None) {
diff --git a/alacritty_terminal/tests/ref.rs b/alacritty_terminal/tests/ref.rs
index a9f64f55..848a0ad1 100644
--- a/alacritty_terminal/tests/ref.rs
+++ b/alacritty_terminal/tests/ref.rs
@@ -126,13 +126,7 @@ fn ref_test(dir: &Path) {
let cell = &term_grid[Line(i as i32)][Column(j)];
let original_cell = &grid[Line(i as i32)][Column(j)];
if original_cell != cell {
- println!(
- "[{i}][{j}] {original:?} => {now:?}",
- i = i,
- j = j,
- original = original_cell,
- now = cell,
- );
+ println!("[{i}][{j}] {original_cell:?} => {cell:?}",);
}
}
}