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

Bring SmallVec closer to Vec #26

Merged
merged 8 commits into from Aug 19, 2016
Merged

Bring SmallVec closer to Vec #26

merged 8 commits into from Aug 19, 2016

Conversation

@Marwes
Copy link
Contributor

Marwes commented Jul 31, 2016

This PR implements almost all traits which Vec implements for SmallVec, bringing it closer to being a drop in replacement for Vec. A few implementations were omitted such as Extend<&A::Item> which could not be implemented due to a conflict with Extend<A::Item>, a few From implementations which may be a bit more esoteric (easily added if so desired) and Write.


This change is Reviewable

Marwes added 6 commits Jul 31, 2016
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> { ... }`
@Marwes
Copy link
Contributor Author

Marwes commented Jul 31, 2016

The renaming of into_iter to drain is a breaking change but was necessary due to implementing IntoIter for SmallVec (so it can be used directly in for loops). drain is also not an exact match for Vec::drain as RangeArgument is not yet stabilized.

@Ms2ger
Copy link
Contributor

Ms2ger commented Aug 1, 2016

Might be worth adding tests for borrow/as_ref and anything else I missed?

@Marwes
Copy link
Contributor Author

Marwes commented Aug 1, 2016

Added tests for traits that missed them!

@Marwes
Copy link
Contributor Author

Marwes commented Aug 10, 2016

Bump

lib.rs Outdated
type Item = A::Item;

#[inline]
#[inline]

This comment has been minimized.

Copy link
@rphmeier

rphmeier Aug 10, 2016

Contributor

two inline annotations?

This comment has been minimized.

Copy link
@Marwes

Marwes Aug 11, 2016

Author Contributor

fixed

@rphmeier
Copy link
Contributor

rphmeier commented Aug 18, 2016

Looks good to me; I'd appreciate if this could land soon :)

@SimonSapin
Copy link
Member

SimonSapin commented Aug 19, 2016

Looks good, thanks!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Aug 19, 2016

📌 Commit 200f4f2 has been approved by SimonSapin

@SimonSapin
Copy link
Member

SimonSapin commented Aug 19, 2016

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.

@SimonSapin SimonSapin merged commit 7e07fc0 into servo:master Aug 19, 2016
1 of 2 checks passed
1 of 2 checks passed
code-review/reviewable 1 file, 1 discussion left (rphmeier)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cbarrick cbarrick mentioned this pull request Nov 15, 2018
8 of 12 tasks complete
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

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