Re: [PATCH v20 3/4] rust: faux: Allow retrieving a bound Device

From: Danilo Krummrich

Date: Fri Jun 12 2026 - 16:17:51 EST


On Fri Jun 12, 2026 at 9:02 PM CEST, Gary Guo wrote:
>> +impl AsRef<device::Device<device::Bound>> for Registration {
>> + fn as_ref(&self) -> &device::Device<device::Bound> {
>> + // SAFETY:
>> + // - The underlying `device` in `faux_device` is guaranteed by the C API to be a valid
>> + // initialized `device`.
>> + // - faux_match() always returns 1, and probe runs synchronously (PROBE_FORCE_SYNCHRONOUS).
>
> Please quote all code with backticks.

As far as I'm concerned there's no need to do that for things that are not
rendered anyway. But also feel free to do it anyway of course.

Thanks,
Danilo