Skip to content

Commit e4e6805

Browse files
committed
fix(windows): fixes for feedback
1 parent 1636ec2 commit e4e6805

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/chat-cli/src/util/process/windows.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ impl Deref for SafeHandle {
5353
}
5454

5555
#[cfg(test)]
56-
#[cfg(windows)]
5756
mod tests {
5857
use std::process::Command;
5958
use std::time::Duration;
@@ -63,7 +62,7 @@ mod tests {
6362
// Helper to create a long-running process for testing
6463
fn spawn_test_process() -> std::process::Child {
6564
let mut command = Command::new("cmd");
66-
command.args(["/C", "ping 127.0.0.1 -n 30 > nul"]);
65+
command.args(["/C", "timeout 30 > nul"]);
6766
command.spawn().expect("Failed to spawn test process")
6867
}
6968

@@ -111,7 +110,7 @@ mod tests {
111110
#[test]
112111
fn test_safe_handle() {
113112
// Test creating a SafeHandle with an invalid handle
114-
let invalid_handle = HANDLE(0);
113+
let invalid_handle = HANDLE(std::ptr::null_mut());
115114
let safe_handle = SafeHandle::new(invalid_handle);
116115
assert!(safe_handle.is_none(), "SafeHandle should be None for invalid handle");
117116

crates/chat-cli/src/util/system_info/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use serde::{
1414
use crate::platform::Env;
1515

1616
/// Fields for OS release information
17+
/// Fields from <https://www.man7.org/linux/man-pages/man5/os-release.5.html>
1718
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
1819
pub struct OsRelease {
1920
pub id: Option<String>,

0 commit comments

Comments
 (0)