From b49add2e89c540e9722c40de3c7b01e768e491ad Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:26:45 +0100 Subject: [PATCH] reduce warnings when --no-default-features --- src/gui/modular/button.rs | 5 ----- src/main.rs | 10 ++++++---- src/overlays/screen.rs | 1 + 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/gui/modular/button.rs b/src/gui/modular/button.rs index 5dc5fb8..b028cdb 100644 --- a/src/gui/modular/button.rs +++ b/src/gui/modular/button.rs @@ -634,11 +634,6 @@ fn run_window(window: &Arc, action: &WindowAction, app: &mut AppState) { } } -#[cfg(not(feature = "wayland"))] -fn run_action_window(_: Arc, _: &WindowAction, _: &mut AppState) { - log::warn!("Cannot run Window action without Wayland feature."); -} - fn audio_thump(app: &mut AppState) { if let Some(handle) = app.audio.get_handle() { let wav = include_bytes!("../../res/380885.wav"); diff --git a/src/main.rs b/src/main.rs index 8e7bea1..e7e755c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -115,9 +115,10 @@ fn auto_run(running: Arc, args: Args) { compile_error!("No desktop support! Enable either wayland or x11 features!"); } -fn args_get_openvr(args: &Args) -> bool { +#[allow(dead_code)] +fn args_get_openvr(_args: &Args) -> bool { #[cfg(feature = "openvr")] - let ret = args.openvr; + let ret = _args.openvr; #[cfg(not(feature = "openvr"))] let ret = false; @@ -125,9 +126,10 @@ fn args_get_openvr(args: &Args) -> bool { ret } -fn args_get_openxr(args: &Args) -> bool { +#[allow(dead_code)] +fn args_get_openxr(_args: &Args) -> bool { #[cfg(feature = "openxr")] - let ret = args.openxr; + let ret = _args.openxr; #[cfg(not(feature = "openxr"))] let ret = false; diff --git a/src/overlays/screen.rs b/src/overlays/screen.rs index 423cb54..68fa349 100644 --- a/src/overlays/screen.rs +++ b/src/overlays/screen.rs @@ -798,6 +798,7 @@ where Ok((overlays, extent)) } +#[allow(unused)] pub enum Transform { Normal, _90,