mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
nak: Use .as_ref().unwrap() instead ofv &*
Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
This commit is contained in:
parent
02f509a9d0
commit
7db9bd0c1b
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ use std::sync::{Arc, Mutex};
|
|||
unsafe fn is_nvidia_device(dev: drmDevicePtr) -> bool {
|
||||
match (*dev).bustype as u32 {
|
||||
DRM_BUS_PCI => {
|
||||
let pci = &*(*dev).deviceinfo.pci;
|
||||
let pci = (*dev).deviceinfo.pci.as_ref().unwrap();
|
||||
pci.vendor_id == (NVIDIA_VENDOR_ID as u16)
|
||||
}
|
||||
_ => false,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue