chore(gates): zero clippy warnings and a buildable sandbox example on Windows
The full-workspace gates had never run on this platform: collapsible ifs in the Windows shell probe, a same-type cast in the crash handler, an unused AsRawHandle import, and the sandbox smoke-test example building its unix-only body (libc, kernel enforcement) unconditionally. The example now stubs main off-unix; formatting reflow from cargo fmt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSy9S31pZNWXtRZNVJ1sDf
This commit is contained in:
1 parent
25d1a4f980
commit
50669bf302
10 files changed
+75
-60
No files matched your search
@@ -78,11 +78,10 @@ pub fn detect_windows_shell() -> &'static WindowsShell {
|
||||
kigi_tty_utils::detach_std_command(&mut cmd);
|
||||
cmd.arg("pwsh.exe").stdin(std::process::Stdio::null());
|
||||
cmd.output()
|
||||
} {
|
||||
if output.status.success() {
|
||||
tracing::info!("Windows shell: pwsh");
|
||||
return WindowsShell::Pwsh;
|
||||
}
|
||||
} && output.status.success()
|
||||
{
|
||||
tracing::info!("Windows shell: pwsh");
|
||||
return WindowsShell::Pwsh;
|
||||
}
|
||||
|
||||
// powershell.exe (Windows PowerShell 5.1).
|
||||
@@ -131,14 +130,13 @@ fn find_git_bash() -> Option<String> {
|
||||
kigi_tty_utils::detach_std_command(&mut cmd);
|
||||
cmd.arg("bash.exe").stdin(std::process::Stdio::null());
|
||||
cmd.output()
|
||||
} {
|
||||
if output.status.success() {
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
for line in stdout.lines() {
|
||||
let line = line.trim();
|
||||
if line.to_ascii_lowercase().contains("git") {
|
||||
return Some(line.to_string());
|
||||
}
|
||||
} && output.status.success()
|
||||
{
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
for line in stdout.lines() {
|
||||
let line = line.trim();
|
||||
if line.to_ascii_lowercase().contains("git") {
|
||||
return Some(line.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user