Fixed clippy warnings

This commit is contained in:
G2-Games 2024-02-01 16:09:02 -06:00
parent 138d642fc9
commit 0af8b86c25
2 changed files with 2 additions and 4 deletions

View file

@ -71,7 +71,7 @@ pub async fn get_device_filter(device_filter: Vec<DeviceFilter>) -> Result<UsbDe
// See if the device exists in the list // See if the device exists in the list
if device_filter if device_filter
.iter() .iter()
.position(|info| { .any(|info| {
let mut result = false; let mut result = false;
if info.vendor_id.is_some() { if info.vendor_id.is_some() {
@ -96,7 +96,6 @@ pub async fn get_device_filter(device_filter: Vec<DeviceFilter>) -> Result<UsbDe
result result
}) })
.is_some()
{ {
device_info = Some(prelim_dev_inf) device_info = Some(prelim_dev_inf)
} }

View file

@ -116,7 +116,7 @@ pub async fn get_device_filter(
if device_filter if device_filter
.iter() .iter()
.position(|info| { .any(|info| {
let mut result = false; let mut result = false;
if info.vendor_id.is_some() { if info.vendor_id.is_some() {
@ -141,7 +141,6 @@ pub async fn get_device_filter(
result result
}) })
.is_some()
{ {
return Ok(UsbDevice { device }); return Ok(UsbDevice { device });
} }