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

Make SmallVec::drop sound and other stuff #7

Merged
merged 4 commits into from Jun 10, 2015
Merged

Make SmallVec::drop sound and other stuff #7

merged 4 commits into from Jun 10, 2015

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Jun 10, 2015

  • Use an enum so that we’re not dropping uninitialized T inside [T; $size]
  • Move fields into that enum to make the struct smaller
  • Refactor to be generic over array types rather than generate multiple SmallVecN types with macros.

r? @Manishearth

SimonSapin added 4 commits Jun 10, 2015
The pointer and capacity fields are only used when spilled, move them into the enum.
@Manishearth
Copy link
Member

Manishearth commented Jun 10, 2015

r+

Manishearth added a commit that referenced this pull request Jun 10, 2015
Make SmallVec::drop sound and other stuff
@Manishearth Manishearth merged commit e360a71 into master Jun 10, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@SimonSapin SimonSapin deleted the stuff branch Jun 10, 2015
@bluss
Copy link
Contributor

bluss commented Jun 10, 2015

With acknowledgment of: using ideas like Nodrop & Array trait from @bluss' arrayvec crate.

@SimonSapin
Copy link
Member Author

SimonSapin commented Jun 10, 2015

Yes, sorry I forgot to mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.