[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:
parent
74758d21a0
commit
e4f85a2b69
1 changed files with 1 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue