mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
rust: error: Markdown style nit
This patch fixes a trivial markdown style nit in the `SAFETY` comment.
Signed-off-by: Manmohan Shukla <manmshuk@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Jianguo Bao <roidinev@gmail.com>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Finn Behrens <me@kloenk.dev>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Fixes: c7e20faa5f
("rust: error: Add Error::to_ptr()")
Link: https://lore.kernel.org/r/20230906204857.85619-1-manmshuk@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
17bfcd6a81
commit
2a7e0a52ec
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ impl Error {
|
||||||
/// Returns the error encoded as a pointer.
|
/// Returns the error encoded as a pointer.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub(crate) fn to_ptr<T>(self) -> *mut T {
|
pub(crate) fn to_ptr<T>(self) -> *mut T {
|
||||||
// SAFETY: self.0 is a valid error due to its invariant.
|
// SAFETY: `self.0` is a valid error due to its invariant.
|
||||||
unsafe { bindings::ERR_PTR(self.0.into()) as *mut _ }
|
unsafe { bindings::ERR_PTR(self.0.into()) as *mut _ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue