Skip to content

Conversation

@Marwes
Copy link
Contributor

@Marwes 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
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

type Item = A::Item;

#[inline]
#[inline]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two inline annotations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@rphmeier
Copy link
Contributor

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

@SimonSapin
Copy link
Member

Looks good, thanks!

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 200f4f2 has been approved by SimonSapin

@SimonSapin
Copy link
Member

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
@cbarrick cbarrick mentioned this pull request Nov 15, 2018
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants