From 9ada45249912690fbe40442f6215b31382ff4b09 Mon Sep 17 00:00:00 2001 From: Guillaume Jay Date: Thu, 16 Jul 2026 21:40:50 +0200 Subject: [PATCH] fix(pty): scope the io::Write import to the unix branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit write_private only needs Write in its #[cfg(unix)] arm, where it calls file.write_all; the non-unix arm goes through fs::write. A module-scope import is therefore unused on Windows, which fails clippy -D warnings and has kept cross-os (windows-latest) red on main since #217. The PR gate runs clippy on ubuntu only — cross-os is a post-merge signal by design (docs/CI.md §3), so a platform-conditional import slips through it. --- crates/pty/src/status.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pty/src/status.rs b/crates/pty/src/status.rs index 14c262d..5a37a4a 100644 --- a/crates/pty/src/status.rs +++ b/crates/pty/src/status.rs @@ -4,7 +4,6 @@ //! Pure of any real PTY, so the command/env contract and the status fold are //! unit-tested directly. -use std::io::Write; use std::path::{Path, PathBuf}; use portable_pty::CommandBuilder; @@ -83,6 +82,7 @@ pub(crate) fn write_mcp_config(session: SessionId, config: &McpConfig) -> Option #[cfg(unix)] fn write_private(path: &Path, contents: &str) -> std::io::Result<()> { use std::fs::OpenOptions; + use std::io::Write; use std::os::unix::fs::OpenOptionsExt; let mut file = OpenOptions::new()