reduce warnings when --no-default-features

This commit is contained in:
galister
2024-03-01 22:26:45 +01:00
parent da1936823f
commit b49add2e89
3 changed files with 7 additions and 9 deletions

View File

@@ -634,11 +634,6 @@ fn run_window(window: &Arc<str>, action: &WindowAction, app: &mut AppState) {
} }
} }
#[cfg(not(feature = "wayland"))]
fn run_action_window(_: Arc<str>, _: &WindowAction, _: &mut AppState) {
log::warn!("Cannot run Window action without Wayland feature.");
}
fn audio_thump(app: &mut AppState) { fn audio_thump(app: &mut AppState) {
if let Some(handle) = app.audio.get_handle() { if let Some(handle) = app.audio.get_handle() {
let wav = include_bytes!("../../res/380885.wav"); let wav = include_bytes!("../../res/380885.wav");

View File

@@ -115,9 +115,10 @@ fn auto_run(running: Arc<AtomicBool>, args: Args) {
compile_error!("No desktop support! Enable either wayland or x11 features!"); 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")] #[cfg(feature = "openvr")]
let ret = args.openvr; let ret = _args.openvr;
#[cfg(not(feature = "openvr"))] #[cfg(not(feature = "openvr"))]
let ret = false; let ret = false;
@@ -125,9 +126,10 @@ fn args_get_openvr(args: &Args) -> bool {
ret ret
} }
fn args_get_openxr(args: &Args) -> bool { #[allow(dead_code)]
fn args_get_openxr(_args: &Args) -> bool {
#[cfg(feature = "openxr")] #[cfg(feature = "openxr")]
let ret = args.openxr; let ret = _args.openxr;
#[cfg(not(feature = "openxr"))] #[cfg(not(feature = "openxr"))]
let ret = false; let ret = false;

View File

@@ -798,6 +798,7 @@ where
Ok((overlays, extent)) Ok((overlays, extent))
} }
#[allow(unused)]
pub enum Transform { pub enum Transform {
Normal, Normal,
_90, _90,