From 2d6496dd8432c71b65d67c7216fbd4428c06527b Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Tue, 23 Feb 2016 19:25:43 +0100 Subject: 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. --- src/libstd/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index d8ecddcbe42..f9e7c1fede2 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -222,6 +222,7 @@ #![feature(collections)] #![feature(collections_bound)] #![feature(const_fn)] +#![feature(copy_from_slice)] #![feature(core_float)] #![feature(core_intrinsics)] #![feature(decode_utf16)] -- cgit 1.4.1-3-g733a5