-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #130 - heycam:from-raw-parts, r=mbrubeck
Add from_raw_parts. I have a need to create a `SmallVec` using a heap allocation that I control. Something that works just like `Vec::from_raw_parts` fits the bill. The PR here adds a similar method, with the important difference that it panics if asked to conjure up a `SmallVec` that would use its inline storage rather than spilled, heap storage. This is a dependency of my work in https://bugzilla.mozilla.org/show_bug.cgi?id=1474793. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/130) <!-- Reviewable:end -->
- Loading branch information
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters