diff --git a/alvr/client_core/build.rs b/alvr/client_core/build.rs index 1b0cd9869d..d536b89666 100644 --- a/alvr/client_core/build.rs +++ b/alvr/client_core/build.rs @@ -14,12 +14,12 @@ fn main() { let source_files_paths = cpp_paths .iter() - .filter_map(|path| { + .filter(|&path| { path.extension() .filter(|ext| ext.to_string_lossy() == "cpp") .is_some() - .then(|| path.clone()) }) + .cloned() .collect::>(); cc::Build::new() diff --git a/alvr/server/src/c_api.rs b/alvr/server/src/c_api.rs index e78a106107..9c81bf4967 100644 --- a/alvr/server/src/c_api.rs +++ b/alvr/server/src/c_api.rs @@ -1,3 +1,5 @@ +#![allow(dead_code, unused_variables)] + use ash::vk; use std::{ ffi::{c_char, CStr}, diff --git a/alvr/server/src/lib.rs b/alvr/server/src/lib.rs index b970ad559e..386c109edf 100644 --- a/alvr/server/src/lib.rs +++ b/alvr/server/src/lib.rs @@ -147,13 +147,13 @@ pub extern "C" fn shutdown_driver() { let hostnames = data_manager_lock .client_list() .iter() - .filter_map(|(hostname, info)| { - (!matches!( + .filter(|&(_, info)| { + !matches!( info.connection_state, ConnectionState::Disconnected | ConnectionState::Disconnecting { .. } - )) - .then(|| hostname.clone()) + ) }) + .map(|(hostname, _)| hostname.clone()) .collect::>(); for hostname in hostnames {