Skip to content

Add ExtendFromSlice trait #54

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

Merged
merged 1 commit into from
Jun 28, 2017
Merged

Add ExtendFromSlice trait #54

merged 1 commit into from
Jun 28, 2017

Conversation

eira-fransham
Copy link
Contributor

@eira-fransham eira-fransham commented Jun 27, 2017

At Parity we tried to switch from our internal elastic-array crate (which has soundness and ergonomics issues) to smallvec but the PR that attempted this replaced extend_from_slice calls with push loops (which are much slower). We could fix this internally, but the discussion around it made me wonder if this would be something that could be useful upstream.


This change is Reviewable

@jdm
Copy link
Member

jdm commented Jun 27, 2017

Could you split this into two separate commits? One for formatting changes, and the other for the actual implementation changes.

@eira-fransham
Copy link
Contributor Author

@jdm Sorry, I didn't intend to commit the formatting. I run rustfmt a lot when writing code because I'm lazy and can't be bothered to manually indent. I'll hard push a new commit without the formatting.

@mbrubeck
Copy link
Collaborator

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 226730c has been approved by mbrubeck

@bors-servo
Copy link
Contributor

⌛ Testing commit 226730c with merge 2549c2a...

bors-servo pushed a commit that referenced this pull request Jun 28, 2017
Add ExtendFromSlice trait

At Parity we tried to switch from our internal `elastic-array` crate (which has soundness and ergonomics issues) to `smallvec` but the PR that attempted this replaced `extend_from_slice` calls with `push` loops (which are much slower). We could fix this internally, but the discussion around it made me wonder if this would be something that could be useful upstream.

<!-- 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/54)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: mbrubeck
Pushing 2549c2a to master...

@bors-servo bors-servo merged commit 226730c into servo:master Jun 28, 2017
mbrubeck added a commit to mbrubeck/rust-smallvec that referenced this pull request Jun 28, 2017
New features:

* `no_std` support (servo#49).
* `SmallVec<[u8; N]>` implements the `Write` trait (servo#52).
* Add an `ExtendFromSlice` trait for both `Vec` and `SmallVec` (servo#54).
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.

4 participants