diff --git a/src/daemon.rs b/src/daemon.rs index 02ade4d..9c4dd76 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -4461,8 +4461,7 @@ mod tests { .expect("export snapshot") }; let peer = loro::LoroDoc::new(); - peer.set_peer_id(u64::from(FrontendId::LOCAL.0)) - .expect("set peer id"); + peer.set_peer_id(FrontendId::LOCAL.0).expect("set peer id"); peer.import(&snapshot_bytes).expect("import snapshot"); let v_before = peer.oplog_vv(); peer.get_text("body").insert(0, "x").expect("peer insert"); @@ -4541,13 +4540,17 @@ mod tests { } /// Kill ring Q#KR2 — GPU typing arrives here without touching - /// dispatch_key, so it must update the source frontend's command + /// `dispatch_key`, so it must update the source frontend's command /// boundary or `C-k x C-k` on the GPU would append across the typed /// character. A single-codepoint insert classifies as /// `buffer.self-insert` (the input-origin signal for signature /// help); anything else breaks the chain outright. #[cfg(feature = "crdt")] #[test] + #[allow( + clippy::too_many_lines, + reason = "one end-to-end classification scenario per kill-chain case" + )] fn handle_remote_crdt_op_classifies_typed_input_and_ends_kill_chains() { use crate::editor::EditorState; use crate::protocol::FrontendId; diff --git a/tests/auto_indent_crdt_acceptance.rs b/tests/auto_indent_crdt_acceptance.rs index 718f927..462ce98 100644 --- a/tests/auto_indent_crdt_acceptance.rs +++ b/tests/auto_indent_crdt_acceptance.rs @@ -39,7 +39,7 @@ fn read_initial_snapshot( } /// Mutate the local replica, export the delta, and ship it as an -/// optimistic `FrontendEvent::CrdtOp` (the m10_11 idiom). +/// optimistic `FrontendEvent::CrdtOp` (the `m10_11` idiom). fn send_optimistic_op_from( stream: &mut std::os::unix::net::UnixStream, replica: &CrdtState, diff --git a/tests/bottom_panel_stage2b_gpu_acceptance.rs b/tests/bottom_panel_stage2b_gpu_acceptance.rs index 70814d3..e11493b 100644 --- a/tests/bottom_panel_stage2b_gpu_acceptance.rs +++ b/tests/bottom_panel_stage2b_gpu_acceptance.rs @@ -506,6 +506,10 @@ fn decode_hex(encoded: &str) -> String { /// out its safety deadline cannot read as a pass. #[cfg(feature = "crdt")] #[test] +#[allow( + clippy::too_many_lines, + reason = "one real-daemon/real-PTY/real-wgpu scenario; splitting it would hide the fit it exists to prove" +)] fn a54_real_daemon_real_pty_and_headless_gpu_render_one_panel_hosted_terminal() { use std::path::{Path, PathBuf}; diff --git a/tests/vterm_stage3_acceptance.rs b/tests/vterm_stage3_acceptance.rs index c415abf..afa4d83 100644 --- a/tests/vterm_stage3_acceptance.rs +++ b/tests/vterm_stage3_acceptance.rs @@ -634,6 +634,10 @@ pmacs.keymap.bind { scope = "global", sequence = "C-M-t", command = "vterm-probe /// prove nothing about the three fitting together. #[cfg(feature = "crdt")] #[test] +#[allow( + clippy::too_many_lines, + reason = "one real-daemon/real-PTY/real-wgpu scenario; a decoded-message fixture is deliberately not a substitute" +)] fn a37_real_daemon_real_pty_and_headless_gpu_render_one_terminal_session() { use std::path::{Path, PathBuf}; @@ -813,6 +817,10 @@ fn a37_real_daemon_real_pty_and_headless_gpu_render_one_terminal_session() { /// property of the dispatcher loop, not of any function it calls. #[cfg(feature = "crdt")] #[test] +#[allow( + clippy::too_many_lines, + reason = "real daemon, real wire, two real frontends in one dispatcher-loop scenario" +)] fn terminal_mode_keeps_reporting_presence_so_peers_drop_the_stale_caret() { use pmacs::protocol::{ AttachRequest, FrontendCapabilities, Hello, Key, KeyEvent, PROTOCOL_VERSION, @@ -857,13 +865,10 @@ fn terminal_mode_keeps_reporting_presence_so_peers_drop_the_stale_caret() { ) -> T { let deadline = Instant::now() + Duration::from_secs(20); while Instant::now() < deadline { - match read_message::(stream) { - Ok(msg) => { - if let Some(found) = want(&msg) { - return found; - } - } - Err(_) => continue, + if let Ok(msg) = read_message::(stream) + && let Some(found) = want(&msg) + { + return found; } } panic!("timed out waiting for {what}");