[clippy] replace match with question mark operator

Change-Id: I1288b3da28cc4e4cc289b34daf3ce02180d38d62
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/6195241
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Daniel Verkamp 2025-01-23 11:33:44 -08:00 committed by crosvm LUCI
parent 74758d21a0
commit e4f85a2b69

View file

@ -305,10 +305,7 @@ impl SystemAllocator {
/// Allocate PCI slot location.
pub fn allocate_pci(&mut self, bus: u8, tag: String) -> Option<PciAddress> {
let id = self.get_anon_alloc();
let allocator = match self.get_pci_allocator_mut(bus) {
Some(v) => v,
None => return None,
};
let allocator = self.get_pci_allocator_mut(bus)?;
allocator
.allocate(1, id, tag)
.map(|v| PciAddress {