Skip to content

Minor change memory copy and swap functions #12143

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

Closed
wants to merge 2 commits into from
Closed

Conversation

brson
Copy link
Contributor

@brson brson commented Feb 10, 2014

Thinking about swap as an example of unsafe programming. This cleans it up a bit. It also removes type parametrization over RawPtr from the memcpy functions to make this compile.

brson added 2 commits February 9, 2014 16:23
It unsafe assumptions that any impl of RawPtr is for actual pointers,
that they can be copied by memcpy. Removing it is easy, so I don't
think it's solving a real problem.
@alexcrichton
Copy link
Member

r=me with a rebase

bors added a commit that referenced this pull request Feb 10, 2014
Thinking about swap as an example of unsafe programming. This cleans it up a bit. It also removes type parametrization over `RawPtr` from the memcpy functions to make this compile.
@bors bors closed this Feb 10, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
improve the default constructor mode when filling fields

Instead of filling a boolean field with `bool::default()` it's not `false` and same for `Option` instead of using `Option::default()` it will be `None`
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