Commit 3691fd19 authored by Yilin Chen's avatar Yilin Chen Committed by Danilo Krummrich
Browse files

rust: device_id: replace incorrect word in safety documentation



The safety documentation incorrectly refers to `RawDeviceId` when
transmuting to `RawType`. This fixes the documentation to correctly
indicate that implementers must ensure layout compatibility with
`RawType`, not `RawDeviceId`.

Fixes: 9b90864b ("rust: implement `IdArray`, `IdTable` and `RawDeviceId`")
Signed-off-by: default avatarYilin Chen <1479826151@qq.com>
Link: https://patch.msgid.link/tencent_C18DD5047749311142ED455779C7CCCF3A08@qq.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent 68ece1e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
/// # Safety
///
/// Implementers must ensure that `Self` is layout-compatible with [`RawDeviceId::RawType`];
/// i.e. it's safe to transmute to `RawDeviceId`.
/// i.e. it's safe to transmute to `RawType`.
///
/// This requirement is needed so `IdArray::new` can convert `Self` to `RawType` when building
/// the ID table.