Skip to content

Commit 3cc3fcb

Browse files
fix: remove compiler warnings for unused imports, variables, and irrefutable patterns
- Remove unused CommandExt import in app_server.rs - Prefix unused cfg-gated variables with underscore (lib.rs event, tailscale command) - Replace irrefutable let...else with plain let in remote_backend tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 66cfed0 commit 3cc3fcb

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

src-tauri/src/backend/app_server.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use crate::types::WorkspaceEntry;
1919

2020
#[cfg(target_os = "windows")]
2121
use crate::shared::process_core::{build_cmd_c_command, resolve_windows_executable};
22-
#[cfg(target_os = "windows")]
23-
use std::os::windows::process::CommandExt;
2422

2523
fn extract_thread_id(value: &Value) -> Option<String> {
2624
fn extract_from_container(container: Option<&Value>) -> Option<String> {

src-tauri/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ pub fn run() {
102102
let builder = tauri::Builder::default();
103103

104104
let builder = builder
105-
.on_window_event(|window, event| {
105+
.on_window_event(|window, _event| {
106106
if window.label() != "main" {
107107
return;
108108
}
109109
#[cfg(target_os = "macos")]
110-
if let WindowEvent::CloseRequested { api, .. } = event {
110+
if let WindowEvent::CloseRequested { api, .. } = _event {
111111
api.prevent_close();
112112
let _ = window.hide();
113113
}

src-tauri/src/remote_backend/mod.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,7 @@ mod tests {
273273
settings.remote_backend_host = "tcp.example:4732".to_string();
274274

275275
let config = resolve_transport_config(&settings).expect("transport config");
276-
let RemoteTransportConfig::Tcp { host, .. } = config else {
277-
panic!("expected tcp transport config");
278-
};
276+
let RemoteTransportConfig::Tcp { host, .. } = config;
279277
assert_eq!(host, "tcp.example:4732");
280278
}
281279

@@ -304,9 +302,7 @@ mod tests {
304302
settings.active_remote_backend_id = Some("staging".to_string());
305303

306304
let config = resolve_transport_config(&settings).expect("transport config");
307-
let RemoteTransportConfig::Tcp { host, auth_token } = config else {
308-
panic!("expected tcp transport config");
309-
};
305+
let RemoteTransportConfig::Tcp { host, auth_token } = config;
310306
assert_eq!(host, "staging.example:4732");
311307
assert!(auth_token.is_none());
312308
}
@@ -318,9 +314,7 @@ mod tests {
318314
settings.active_remote_backend_id = Some("nonexistent".to_string());
319315

320316
let config = resolve_transport_config(&settings).expect("transport config");
321-
let RemoteTransportConfig::Tcp { host, .. } = config else {
322-
panic!("expected tcp transport config");
323-
};
317+
let RemoteTransportConfig::Tcp { host, .. } = config;
324318
assert_eq!(host, "fallback:4732");
325319
}
326320

src-tauri/src/tailscale/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use self::core as tailscale_core;
2626
#[cfg(any(target_os = "android", target_os = "ios"))]
2727
const UNSUPPORTED_MESSAGE: &str = "Tailscale integration is only available on desktop.";
2828

29-
fn apply_tailscale_command_env(command: &mut tokio::process::Command) {
29+
fn apply_tailscale_command_env(_command: &mut tokio::process::Command) {
3030
#[cfg(target_os = "macos")]
3131
{
3232
// The app-bundled Tailscale binary can fail with CLIError 3 when TERM is missing

0 commit comments

Comments
 (0)