about summary refs log tree commit diff
path: root/src/libstd/vec.rs
diff options
context:
space:
mode:
authorblake2-ppc <blake2-ppc>2013-08-07 16:58:56 +0200
committerCorey Richardson <corey@octayn.net>2013-08-07 22:39:57 -0400
commit40bdbf0f5d1e997891918a2bf8bec5fc61432f05 (patch)
tree920bcdd76ecbd1665c228f50df526a036660b131 /src/libstd/vec.rs
parent026c1ae3113a6333bace9058d2d38cb7bc1c9cc8 (diff)
downloadrust-40bdbf0f5d1e997891918a2bf8bec5fc61432f05.tar.gz
rust-40bdbf0f5d1e997891918a2bf8bec5fc61432f05.zip
std: Fix for-range loops that can use iterators
Fix inappropriate for-range loops to use for-iterator constructs (or
other appropriate solution) instead.
Diffstat (limited to 'src/libstd/vec.rs')
-rw-r--r--src/libstd/vec.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index 36201dc5e82..0f6d94bb771 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -1602,8 +1602,8 @@ impl<T:Clone> OwnedCopyableVector<T> for ~[T] {
         let new_len = self.len() + rhs.len();
         self.reserve(new_len);
 
-        for i in range(0u, rhs.len()) {
-            self.push(unsafe { raw::get(rhs, i) })
+        for elt in rhs.iter() {
+            self.push((*elt).clone())
         }
     }