You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I've been poking through the code of this library recently, I've noticed that there are a lot of undocumented unsafe fns and blocks. I'd like to go through and improve documentation and encapsulation for a lot of these areas, if that's alright.
The specific steps that I feel could help with this a lot:
Apply the unsafe_op_in_unsafe_fn, clippy::multiple_unsafe_ops_per_block, and clippy::undocumented_unsafe_blocks lints in the Cargo.toml (and fix what they warn)
Replace a lot of the inner: *mut _ fields with inner: NonNull<_> instead to ensure the inner ptrs aren't null when we dereference them
Add utility fns that utilize NonNull::as_ref to get valid references to inner (for a lot of these wrapping structs) to avoid needing an unsafe block per-function
Do these all sound like reasonable steps? Would you accept PRs that take these steps?
The text was updated successfully, but these errors were encountered:
As I've been poking through the code of this library recently, I've noticed that there are a lot of undocumented
unsafe
fns and blocks. I'd like to go through and improve documentation and encapsulation for a lot of these areas, if that's alright.The specific steps that I feel could help with this a lot:
unsafe_op_in_unsafe_fn
,clippy::multiple_unsafe_ops_per_block
, andclippy::undocumented_unsafe_blocks
lints in the Cargo.toml (and fix what they warn)inner: *mut _
fields withinner: NonNull<_>
instead to ensure the inner ptrs aren't null when we dereference themNonNull::as_ref
to get valid references toinner
(for a lot of these wrapping structs) to avoid needing an unsafe block per-functionDo these all sound like reasonable steps? Would you accept PRs that take these steps?
The text was updated successfully, but these errors were encountered: