mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 01:16:50 +00:00
usb_util: fix clippy::unnecessary_get_then_check
Fixes new clippy warning with Rust 1.77 BUG=b:344974550 TEST=tools/clippy Change-Id: I531655a78f31e94ab6745339186af5c44e95d50d Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5599120 Reviewed-by: Morg <morg@google.com> Commit-Queue: Morg <morg@google.com> Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
c691a7fb4d
commit
35bfbb7403
1 changed files with 2 additions and 3 deletions
|
@ -221,10 +221,9 @@ pub fn parse_usbfs_descriptors(data: &[u8]) -> Result<DeviceDescriptorTree> {
|
|||
}
|
||||
|
||||
for intf_idx in 0..config_descriptor.bNumInterfaces {
|
||||
if config_descriptor
|
||||
if !config_descriptor
|
||||
.interface_descriptors
|
||||
.get(&(intf_idx, 0))
|
||||
.is_none()
|
||||
.contains_key(&(intf_idx, 0))
|
||||
{
|
||||
warn!("device interface {} has no interface descriptors", intf_idx);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue