Skip to content

Conversation

bluss
Copy link
Contributor

@bluss bluss commented Feb 26, 2016

Use .copy_from_slice() where applicable

.copy_from_slice() does the same job of .clone_from_slice(), but the
former is explicitly for Copy elements and calls memcpy directly, and
thus is it efficient without optimization too.

.copy_from_slice() does the same job of .clone_from_slice(), but the
former is explicitly for Copy elements and calls `memcpy` directly, and
thus is it efficient without optimization too.
@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@bluss
Copy link
Contributor Author

bluss commented Feb 26, 2016

cc @ubsan FYI

@alexcrichton
Copy link
Member

@bors: r+ 2d6496d

@bluss
Copy link
Contributor Author

bluss commented Feb 26, 2016

Thanks :) The I/O impls are back where they should be with this.

@strega-nil
Copy link
Contributor

@bluss thanks :)

bors added a commit that referenced this pull request Feb 27, 2016
Use .copy_from_slice() where applicable

.copy_from_slice() does the same job of .clone_from_slice(), but the
former is explicitly for Copy elements and calls `memcpy` directly, and
thus is it efficient without optimization too.
@bors
Copy link
Collaborator

bors commented Feb 27, 2016

⌛ Testing commit 2d6496d with merge f1e191c...

@bors bors merged commit 2d6496d into rust-lang:master Feb 27, 2016
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