Re: [PATCH 3/4] rust: pci: impl TryFrom<&Device> for &pci::Device

From: Alice Ryhl
Date: Thu Mar 20 2025 - 04:37:19 EST


On Wed, Mar 19, 2025 at 09:30:27PM +0100, Danilo Krummrich wrote:
> Implement TryFrom<&device::Device> for &Device.
>
> This allows us to get a &pci::Device from a generic &Device in a safe
> way; the conversion fails if the device' bus type does not match with
> the PCI bus type.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>