about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/wtf8.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs
index 7fe1818291e..f17020de44e 100644
--- a/src/libstd/sys_common/wtf8.rs
+++ b/src/libstd/sys_common/wtf8.rs
@@ -388,9 +388,7 @@ impl Extend<CodePoint> for Wtf8Buf {
         let (low, _high) = iterator.size_hint();
         // Lower bound of one byte per code point (ASCII only)
         self.bytes.reserve(low);
-        for code_point in iterator {
-            self.push(code_point);
-        }
+        iterator.for_each(move |code_point| self.push(code_point));
     }
 }