pgrx
pgrx copied to clipboard
Consider refactoring `*const T` to `NonNull<T>` or `&T`
These files use *const to some T when they could probably actually use either:
-
NonNull<T> -
&T -
Option<NonNull<T>> -
Option<&T>
The Optional forms of these types should be bit-equivalent to *const T. If in doubt, skip any cases where this conversion might seem incorrect due to a wonky lifetime concern, or use a more conservative form.
- [ ] pgx/src/htup.rs
- [ ] pgx/src/varlena.rs
- [ ] pgx/src/itemptr.rs
- [ ] pgx/src/guc.rs
- [ ] pgx/src/datum/uuid.rs
- [ ] pgx/src/datum/varlena.rs
- [ ] pgx/src/datum/internal.rs
- [x] pgx/src/datum/array.rs
- [ ] pgx/src/datum/json.rs
- [ ] pgx/src/hooks.rs
- [ ] pgx/src/stringinfo.rs
- [ ] pgx/src/bgworkers.rs
- [ ] pgx/src/enum_helper.rs
- [ ] pgx/src/memcxt.rs
- [ ] pgx/src/log.rs
Thinking about picking this up. Is it still needed?