aboutsummaryrefslogtreecommitdiff
path: root/tests
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 /tests
parent3a9888cd564dc45d23a7bdd0dba29a6ff1ef48a1 (diff)
chore: enable clippy linting
Diffstat (limited to 'tests')
-rw-r--r--tests/client_mode.rs11
-rw-r--r--tests/cross_area.rs1
-rw-r--r--tests/multi_client.rs1
-rw-r--r--tests/support/mod.rs2
4 files changed, 6 insertions, 9 deletions
diff --git a/tests/client_mode.rs b/tests/client_mode.rs
index 7b6639f9..d5a798ec 100644
--- a/tests/client_mode.rs
+++ b/tests/client_mode.rs
@@ -188,7 +188,6 @@ struct CursorWire {
fn decode_frame_payload(payload: &[u8]) -> std::io::Result<FrameWire> {
bincode::serde::decode_from_slice(payload, bincode::config::standard())
- .map(|(frame, consumed)| (frame, consumed))
.map_err(|err| std::io::Error::new(std::io::ErrorKind::InvalidData, err.to_string()))
.and_then(|(frame, consumed): (FrameWire, usize)| {
if consumed != payload.len() {
@@ -441,7 +440,7 @@ fn client_resize_sends_message() {
stream
.set_read_timeout(Some(Duration::from_secs(2)))
.unwrap();
- while let Ok(_) = read_server_message(&mut stream) {}
+ while read_server_message(&mut stream).is_ok() {}
// Send a Resize message: ClientMessage::Resize is variant 2: { cols: u16, rows: u16 }
let resize_payload = {
@@ -779,7 +778,7 @@ fn navigate_mode_keybind_dispatch_in_server() {
stream
.set_read_timeout(Some(Duration::from_secs(2)))
.unwrap();
- while let Ok(_) = read_server_message(&mut stream) {}
+ while read_server_message(&mut stream).is_ok() {}
// Send Ctrl+B (prefix key) as raw bytes. In kitty mode, Ctrl+B is 0x02.
// In legacy mode, it's also 0x02 (control character).
@@ -797,7 +796,7 @@ fn navigate_mode_keybind_dispatch_in_server() {
stream
.set_read_timeout(Some(Duration::from_millis(200)))
.unwrap();
- while let Ok(_) = read_server_message(&mut stream) {}
+ while read_server_message(&mut stream).is_ok() {}
stream.set_read_timeout(None).unwrap();
// Send 'n' (new workspace in navigate mode).
@@ -897,7 +896,7 @@ fn graceful_shutdown_sends_server_shutdown_to_client() {
stream
.set_read_timeout(Some(Duration::from_secs(2)))
.unwrap();
- while let Ok(_) = read_server_message(&mut stream) {}
+ while read_server_message(&mut stream).is_ok() {}
// Send SIGINT to the server process to trigger graceful shutdown.
if let Some(pid) = spawned.child.process_id() {
@@ -995,7 +994,7 @@ fn client_receives_notify_on_agent_state_change() {
stream
.set_read_timeout(Some(Duration::from_secs(2)))
.unwrap();
- while let Ok(_) = read_server_message(&mut stream) {}
+ while read_server_message(&mut stream).is_ok() {}
// Create a workspace via the API.
let mut ws_stream = UnixStream::connect(&api_socket).expect("connect to API");
diff --git a/tests/cross_area.rs b/tests/cross_area.rs
index db7f5b1f..494b694b 100644
--- a/tests/cross_area.rs
+++ b/tests/cross_area.rs
@@ -518,7 +518,6 @@ struct CursorWire {
fn decode_frame_payload(payload: &[u8]) -> io::Result<FrameWire> {
bincode::serde::decode_from_slice(payload, bincode::config::standard())
- .map(|(frame, consumed)| (frame, consumed))
.map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err.to_string()))
.and_then(|(frame, consumed): (FrameWire, usize)| {
if consumed != payload.len() {
diff --git a/tests/multi_client.rs b/tests/multi_client.rs
index 3294c98b..582fecf7 100644
--- a/tests/multi_client.rs
+++ b/tests/multi_client.rs
@@ -599,7 +599,6 @@ struct CursorWire {
fn decode_frame_payload(payload: &[u8]) -> io::Result<FrameWire> {
bincode::serde::decode_from_slice(payload, bincode::config::standard())
- .map(|(frame, consumed)| (frame, consumed))
.map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err.to_string()))
.and_then(|(frame, consumed): (FrameWire, usize)| {
if consumed != payload.len() {
diff --git a/tests/support/mod.rs b/tests/support/mod.rs
index d26a2043..cc1fb67b 100644
--- a/tests/support/mod.rs
+++ b/tests/support/mod.rs
@@ -287,7 +287,7 @@ pub fn drain_messages(stream: &mut UnixStream) {
stream
.set_read_timeout(Some(Duration::from_millis(200)))
.unwrap();
- while let Ok(_) = read_server_message(stream) {}
+ while read_server_message(stream).is_ok() {}
stream.set_read_timeout(None).unwrap();
}