aboutsummaryrefslogtreecommitdiff
path: root/src/ghostty/mod.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-09 23:16:24 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-09 23:16:24 +0300
commit9f210e973834700d14c6c0283ed750ed5b038e8b (patch)
treecd8c75755c59fdc47bf71ca6dc34e49ab0258ae6 /src/ghostty/mod.rs
parent3a9888cd564dc45d23a7bdd0dba29a6ff1ef48a1 (diff)
chore: enable clippy linting
Diffstat (limited to 'src/ghostty/mod.rs')
-rw-r--r--src/ghostty/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ghostty/mod.rs b/src/ghostty/mod.rs
index 27fcb6f9..02bae73f 100644
--- a/src/ghostty/mod.rs
+++ b/src/ghostty/mod.rs
@@ -234,8 +234,10 @@ impl CellWide {
}
}
+type WritePtyCallback = dyn FnMut(&[u8]) + Send;
+
struct WritePtyCallbackState {
- callback: Box<dyn FnMut(&[u8]) + Send>,
+ callback: Box<WritePtyCallback>,
}
unsafe extern "C" fn write_pty_trampoline(
@@ -1469,10 +1471,10 @@ mod tests {
);
render_state.update(&terminal).unwrap();
- assert_eq!(render_state.cursor_visible().unwrap(), true);
+ assert!(render_state.cursor_visible().unwrap());
terminal.write(b"\x1b[?25l");
render_state.update(&terminal).unwrap();
- assert_eq!(render_state.cursor_visible().unwrap(), false);
+ assert!(!render_state.cursor_visible().unwrap());
terminal.write(b"\x1b[?1049h\x1b[HALT");
assert_eq!(terminal.active_screen().unwrap(), ActiveScreen::Alternate);