-
Notifications
You must be signed in to change notification settings - Fork 151
Bring SmallVec closer to Vec #26
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
Conversation
This contains a forced refactoring of the current `into_iter` method which was renamed to `drain` as it would otherwise conflict with `impl<A: Array> IntoIter for SmallVec<A> { ... }`
The renaming of |
Might be worth adding tests for borrow/as_ref and anything else I missed? |
Added tests for traits that missed them! |
Bump |
type Item = A::Item; | ||
|
||
#[inline] | ||
#[inline] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two inline annotations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Looks good to me; I'd appreciate if this could land soon :) |
Looks good, thanks! @bors-servo r+ |
📌 Commit 200f4f2 has been approved by |
http://build.servo.org/homu/queue/rust-smallvec shows this PR as approved, but it doesn’t look like a Travis build is being scheduled. CC @larsbergstrom https://travis-ci.org/servo/rust-smallvec/builds/151422387 is green. |
This PR implements almost all traits which Vec implements for
SmallVec
, bringing it closer to being a drop in replacement forVec
. A few implementations were omitted such asExtend<&A::Item>
which could not be implemented due to a conflict withExtend<A::Item>
, a fewFrom
implementations which may be a bit more esoteric (easily added if so desired) andWrite
.This change is