Skip to content

Commit

Permalink
refactor: 🚨 Fix some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed Oct 14, 2023
1 parent 15cf60a commit e96b5fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions alvr/client_core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();

cc::Build::new()
Expand Down
2 changes: 2 additions & 0 deletions alvr/server/src/c_api.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code, unused_variables)]

use ash::vk;
use std::{
ffi::{c_char, CStr},
Expand Down
8 changes: 4 additions & 4 deletions alvr/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();

for hostname in hostnames {
Expand Down

0 comments on commit e96b5fe

Please sign in to comment.