diff --git a/src/cli/transport.rs b/src/cli/transport.rs index ce2eb0d..9e7f6cf 100644 --- a/src/cli/transport.rs +++ b/src/cli/transport.rs @@ -2,7 +2,6 @@ use anyhow::{bail, Context, Result}; use serde::{Deserialize, Serialize}; use std::io::{BufRead, BufReader, Write}; use std::path::{Path, PathBuf}; -use std::thread; use std::time::Duration; use crate::config; @@ -321,7 +320,8 @@ fn windows_pid_matches_daemon(pid: u32, expected_exe: Option<&Path>) -> Result) -> Result Result<()> { if !unix_process_exists(pid) { return Ok(()); } - thread::sleep(Duration::from_millis(50)); + std::thread::sleep(Duration::from_millis(50)); } bail!("等待 PID {} 退出超时", pid) diff --git a/src/scanner/windows.rs b/src/scanner/windows.rs index 0f7470b..391ba33 100644 --- a/src/scanner/windows.rs +++ b/src/scanner/windows.rs @@ -5,7 +5,7 @@ /// - OpenProcess: 获取进程句柄(需要 PROCESS_VM_READ | PROCESS_QUERY_INFORMATION) /// - VirtualQueryEx: 枚举内存区域 /// - ReadProcessMemory: 读取内存内容 -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result}; use std::path::Path; use windows::Win32::Foundation::{CloseHandle, HANDLE}; use windows::Win32::System::Diagnostics::Debug::ReadProcessMemory;