Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IoSlice does not implement Clone #69395

Closed
eduardosm opened this issue Feb 23, 2020 · 5 comments · Fixed by #69403
Closed

IoSlice does not implement Clone #69395

eduardosm opened this issue Feb 23, 2020 · 5 comments · Fixed by #69403
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@eduardosm
Copy link
Contributor

IoSlice (from std::io) does not implement the Clone trait. Is there a reason for this? Cloning can be safely simulated with IoSlice::new(*slice), but the lack of the Clone trait prevents from using functions such as Vec::<IoSlice>::extend_from_slice.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Feb 23, 2020
@sfackler
Copy link
Member

IoSlice should be able to implement Copy and Clone - I think the current lack is just an oversight when I added the type. Feel free to make a PR!

@LeSeulArtichaut
Copy link
Contributor

If you need someone to file a PR, I’m up!

@eduardosm
Copy link
Contributor Author

If you need someone to file a PR, I’m up!

I will create a PR soon, but thanks anyways for the offer.

@LeSeulArtichaut
Copy link
Contributor

Oops, I already created #69403 😅

@eduardosm
Copy link
Contributor Author

Whops, I didn't see the linked pull request. Never mind then, lets continue with your PR.

Centril added a commit to Centril/rust that referenced this issue Mar 12, 2020
Centril added a commit to Centril/rust that referenced this issue Mar 13, 2020
@bors bors closed this as completed in 5d90154 Mar 13, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants