Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax pointer_to_metadata preconditions #1826

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

jswrenn
Copy link
Collaborator

@jswrenn jswrenn commented Oct 5, 2024

Change argument type of pointer_to_metadata from NonNull<Self> to *mut Self, since the implementations of pointer_to_metadata do not actually require the argument to be non-null.

I anticipate this change will make future code less verbose, as many standard library APIs return raw pointers, not NonNull; for example, Box::into_raw.

@jswrenn jswrenn requested a review from joshlf October 5, 2024 21:41
Change argument type of `pointer_to_metadata` from `NonNull<Self>`
to `*mut Self`, since the implementations of `pointer_to_metadata`
do not actually require the argument to be non-null.

I anticipate this change will make future code less verbose, as
many standard library APIs return raw pointers, not  `NonNull`; for
example, `Box::into_raw`.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.41%. Comparing base (1271aa0) to head (95cb9a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1826   +/-   ##
=======================================
  Coverage   87.40%   87.41%           
=======================================
  Files          16       16           
  Lines        5995     5997    +2     
=======================================
+ Hits         5240     5242    +2     
  Misses        755      755           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshlf joshlf added this pull request to the merge queue Oct 7, 2024
Merged via the queue into main with commit b01668c Oct 7, 2024
87 checks passed
@joshlf joshlf deleted the relax-pointer_to_metadata branch October 7, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants