-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
qualityImprove the quality of the codeImprove the quality of the code
Description
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
, andclippy::undocumented_unsafe_blocks
lints in the Cargo.toml (and fix what they warn) - Replace a lot of the
inner: *mut _
fields withinner: 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 toinner
(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?
Metadata
Metadata
Assignees
Labels
qualityImprove the quality of the codeImprove the quality of the code