Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd from_vec method for efficient creation from a Vec. #48
Conversation
|
Could you add a few tests for this? In particular, an empty vector pointer may not be an actual valid pointer IIRC (may be |
|
Sure, added. |
|
Oh, ok, so we don't rely on the validness of the pointer (we just rely on @bors-servo r+ Thanks for doing this! |
|
|
Add from_vec method for efficient creation from a Vec. I also bumped the version to 0.3.3 for easy publishing. <!-- 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/48) <!-- Reviewable:end -->
|
Well, we certainly take the raw pointer from |
|
|
Right, there's no guarantee about that AFAIK. See https://bugzilla.mozilla.org/show_bug.cgi?id=1344209, which is the reason I was wary of this. |
|
Looking at the source code for In the bug you linked, it seems that the fix was to use a |
|
Right, it's not about core foundation, but Gecko's code, but that's right :) |
SergioBenitez commentedMar 29, 2017
•
edited by larsbergstrom
I also bumped the version to 0.3.3 for easy publishing.
This change is