diff --git a/tests/e2e_pty.rs b/tests/e2e_pty.rs index 391b765..1bf9a8e 100644 --- a/tests/e2e_pty.rs +++ b/tests/e2e_pty.rs @@ -233,14 +233,13 @@ impl PtyApp { self.send(b"\r"); } - fn pid(&self) -> Option { - self.child.process_id() - } - - /// Resident set size of the child in KiB (Linux only). + /// Resident set size of the child in KiB (Linux only). `process_id` + /// is read inline here rather than via a helper so the method has no + /// non-Linux callers to go dead (the CI clippy gate runs on Linux, + /// where such dead code wouldn't surface). #[cfg(target_os = "linux")] fn rss_kib(&self) -> Option { - let pid = self.pid()?; + let pid = self.child.process_id()?; let status = std::fs::read_to_string(format!("/proc/{pid}/status")).ok()?; status.lines().find_map(|l| { let rest = l.strip_prefix("VmRSS:")?;