devices: vfio: remove unnecessary MemSlot casts

The values that were cast in these expressions were already MemSlot, so
there is no need to cast back and forth between MemSlot and u32.

BUG=None
TEST=tools/presubmit

Change-Id: I8a215bc50d10a93b21f6d2fe7e4ed7267242a50b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3508320
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
diff --git a/devices/src/pci/vfio_pci.rs b/devices/src/pci/vfio_pci.rs
index b01c191..0f5a30d 100644
--- a/devices/src/pci/vfio_pci.rs
+++ b/devices/src/pci/vfio_pci.rs
@@ -918,7 +918,7 @@
                 };
                 match response {
                     VmMemoryResponse::RegisterMemory { pfn: _, slot } => {
-                        mmaps_slots.push(slot as MemSlot);
+                        mmaps_slots.push(slot);
                     }
                     _ => break,
                 }
@@ -931,7 +931,7 @@
     fn remove_bar_mmap(&self, mmap_slot: &MemSlot) {
         if self
             .vm_socket_mem
-            .send(&VmMemoryRequest::UnregisterMemory(*mmap_slot as u32))
+            .send(&VmMemoryRequest::UnregisterMemory(*mmap_slot))
             .is_err()
         {
             error!("failed to send UnregisterMemory request");