summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Copeland <chris@chrisnc.net>2022-07-24 20:04:27 -0700
committerGitHub <noreply@github.com>2022-07-25 03:04:27 +0000
commit766a3b5582fa8ee13506c0f23c9c145ff0012078 (patch)
treec632e397093532a3ad8c9d84a343631c7dff2a57
parentb86667b2989dca71bd584227e5878c89f6888605 (diff)
downloadalacritty-766a3b5582fa8ee13506c0f23c9c145ff0012078.tar.gz
alacritty-766a3b5582fa8ee13506c0f23c9c145ff0012078.zip
Fix clippy warnings
-rw-r--r--alacritty/src/display/mod.rs2
-rw-r--r--alacritty/src/display/window.rs2
-rw-r--r--alacritty_terminal/src/ansi.rs8
-rw-r--r--alacritty_terminal/src/grid/mod.rs2
4 files changed, 7 insertions, 7 deletions
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs
index ec3f9ac7..7bd50049 100644
--- a/alacritty/src/display/mod.rs
+++ b/alacritty/src/display/mod.rs
@@ -134,7 +134,7 @@ impl From<glutin::ContextError> for Error {
}
/// Terminal size info.
-#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq)]
+#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)]
pub struct SizeInfo<T = f32> {
/// Terminal window width.
width: T,
diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs
index ad89738d..480654cf 100644
--- a/alacritty/src/display/window.rs
+++ b/alacritty/src/display/window.rs
@@ -524,7 +524,7 @@ impl Window {
let value = if has_shadows { YES } else { NO };
unsafe {
- let _: () = msg_send![raw_window, setHasShadow: value];
+ let _: id = msg_send![raw_window, setHasShadow: value];
}
}
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index 3f33a1cb..ff468ffc 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -1090,7 +1090,7 @@ where
return unhandled(params);
}
- let clipboard = params[1].get(0).unwrap_or(&b'c');
+ let clipboard = params[1].first().unwrap_or(&b'c');
match params[2] {
b"?" => self.handler.clipboard_load(*clipboard, terminator),
base64 => self.handler.clipboard_store(*clipboard, base64),
@@ -1175,7 +1175,7 @@ where
},
('C', []) | ('a', []) => handler.move_forward(Column(next_param_or(1) as usize)),
('c', intermediates) if next_param_or(0) == 0 => {
- handler.identify_terminal(intermediates.get(0).map(|&i| i as char))
+ handler.identify_terminal(intermediates.first().map(|&i| i as char))
},
('D', []) => handler.move_backward(Column(next_param_or(1) as usize)),
('d', []) => handler.goto_line(Line(next_param_or(1) as i32 - 1)),
@@ -1201,7 +1201,7 @@ where
},
('h', intermediates) => {
for param in params_iter.map(|param| param[0]) {
- match Mode::from_primitive(intermediates.get(0), param) {
+ match Mode::from_primitive(intermediates.first(), param) {
Some(mode) => handler.set_mode(mode),
None => unhandled!(),
}
@@ -1238,7 +1238,7 @@ where
('L', []) => handler.insert_blank_lines(next_param_or(1) as usize),
('l', intermediates) => {
for param in params_iter.map(|param| param[0]) {
- match Mode::from_primitive(intermediates.get(0), param) {
+ match Mode::from_primitive(intermediates.first(), param) {
Some(mode) => handler.unset_mode(mode),
None => unhandled!(),
}
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs
index 8b94ac41..b42c5075 100644
--- a/alacritty_terminal/src/grid/mod.rs
+++ b/alacritty_terminal/src/grid/mod.rs
@@ -540,7 +540,7 @@ impl Dimensions for (usize, usize) {
}
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Eq)]
pub struct Indexed<T> {
pub point: Point,
pub cell: T,