refactor: 🚨 Fix some lints

This commit is contained in:
Riccardo Zaglia 2023-10-14 23:57:59 +08:00
parent 15cf60a594
commit e96b5feaf2
3 changed files with 8 additions and 6 deletions

View File

@ -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()

View File

@ -1,3 +1,5 @@
#![allow(dead_code, unused_variables)]
use ash::vk;
use std::{
ffi::{c_char, CStr},

View File

@ -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 {