mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
fix(cli): suppress dead-code warnings on Windows for Linux-only helpers
Wrap tauri_identifier, single_instance_bus_name and single_instance_object_path with #[cfg(target_os = "linux")] since they are only reachable via D-Bus paths. Move the argv collection into the linux-only block in lib.rs for the same reason. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -517,6 +517,7 @@ fn print_search_human(v: &Value) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn tauri_identifier() -> &'static str {
|
||||
static ID: OnceLock<String> = OnceLock::new();
|
||||
ID.get_or_init(|| {
|
||||
@@ -531,10 +532,12 @@ fn tauri_identifier() -> &'static str {
|
||||
.as_str()
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn single_instance_bus_name() -> String {
|
||||
format!("{}.SingleInstance", tauri_identifier())
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn single_instance_object_path(dbus_name: &str) -> String {
|
||||
let mut dbus_path = dbus_name.replace('.', "/").replace('-', "_");
|
||||
if !dbus_path.starts_with('/') {
|
||||
|
||||
Reference in New Issue
Block a user