mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-06 22:01:44 +08:00
fix: add #[cfg(target_os = "windows")] to WSL helper functions to eliminate dead_code warnings
This commit is contained in:
@@ -657,6 +657,7 @@ fn scan_cli_version(tool: &str) -> (Option<String>, Option<String>) {
|
||||
(None, Some("not installed or not executable".to_string()))
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn wsl_distro_for_tool(tool: &str) -> Option<String> {
|
||||
let override_dir = match tool {
|
||||
"claude" => crate::settings::get_claude_override_dir(),
|
||||
@@ -694,12 +695,6 @@ fn wsl_distro_from_path(path: &Path) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
/// 非 Windows 平台不支持 WSL 路径解析
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
fn wsl_distro_from_path(_path: &Path) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
/// 打开指定提供商的终端
|
||||
///
|
||||
/// 根据提供商配置的环境变量启动一个带有该提供商特定设置的终端
|
||||
|
||||
Reference in New Issue
Block a user