about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-30 11:03:13 +0000
committerbors <bors@rust-lang.org>2015-09-30 11:03:13 +0000
commit3e6d7243ae9749eff27fd320cb422e42291e79d4 (patch)
treebe7e2afaa91d36ba1e4a4c819f2dc8e8c29faa3b /src/libcollections
parent13dc6aac60cd5e135f2419ada23b5e1d042b0594 (diff)
parente2aa82c41395e04f69d615bf427128bc5b77cd38 (diff)
downloadrust-3e6d7243ae9749eff27fd320cb422e42291e79d4.tar.gz
rust-3e6d7243ae9749eff27fd320cb422e42291e79d4.zip
Auto merge of #28731 - bluss:by-ref, r=alexcrichton
Remove redundant uses of Iterator::by_ref()
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/btree/node.rs2
-rw-r--r--src/libcollections/vec.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index f5088bf4646..5ac8a698e98 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -276,7 +276,7 @@ impl<T> DoubleEndedIterator for RawItems<T> {
 
 impl<T> Drop for RawItems<T> {
     fn drop(&mut self) {
-        for _ in self.by_ref() {}
+        for _ in self {}
     }
 }
 
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index d645de028ce..f2ede5c44d3 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1503,7 +1503,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {}
 impl<T> Drop for IntoIter<T> {
     fn drop(&mut self) {
         // destroy the remaining elements
-        for _x in self.by_ref() {}
+        for _x in self {}
 
         // RawVec handles deallocation
     }