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

Merged
merged 1 commit into from
Nov 28, 2024

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.
@phip1611 phip1611 added this pull request to the merge queue Nov 28, 2024
Merged via the queue into rust-osdev:main with commit 72d484f Nov 28, 2024
15 checks passed
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.

None yet

2 participants