-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add 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! |
📌 Commit 0bf0141 has been approved by |
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 |
☀️ Test successful - status-travis |
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 :) |
I also bumped the version to 0.3.3 for easy publishing.
This change is