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

@@ -115,9 +115,10 @@ fn auto_run(running: Arc<AtomicBool>, 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;