Commit 69d5fbb0 authored by Valentin Obst's avatar Valentin Obst Committed by Miguel Ojeda
Browse files

rust: error: improve unsafe code in example



The `from_err_ptr` function is safe. There is no need for the call to it
to be inside the unsafe block.

Reword the SAFETY comment to provide a better justification of why the
FFI call is safe.

Signed-off-by: default avatarValentin Obst <kernel@valentinobst.de>
Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarTrevor Gross <tmgross@umich.edu>
Link: https://lore.kernel.org/r/20240131-doc-fixes-v3-v3-2-0c8af94ed7de@valentinobst.de


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent b6cda913
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment