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

Clean up some use of unsafe in MemoryMapRefMut #1483

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nicholasbishop
Copy link
Member

The qsort, partition, and swap methods do not need to be unsafe; they do some unsafe operations internally, but have safe interfaces.

Add some asserts to ensure that arguments passed to swap and get_element_phys_addr are valid, and also add some safety comments.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

The qsort, partition, and swap methods do not need to be `unsafe`; they do some
unsafe operations internally, but have safe interfaces.

Add some asserts to ensure that arguments passed to swap and
get_element_phys_addr are valid, and also add some safety comments.
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.

1 participant