about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-07-26 17:11:10 +0200
committerljedrz <ljedrz@gmail.com>2018-07-29 18:53:22 +0200
commit59c8a279daf6912b99ba089ff6dafbfc3469831e (patch)
treeab821f37fca36aa9730bed95c0cad5fbf3e9eaa4 /src/bootstrap
parenta5c2d0fffaaf0b764c01bc4066e51ffd475ceae9 (diff)
downloadrust-59c8a279daf6912b99ba089ff6dafbfc3469831e.tar.gz
rust-59c8a279daf6912b99ba089ff6dafbfc3469831e.zip
Replace push loops with collect() and extend() where possible
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/util.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index 9a2b9e90440..be03796921a 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -92,10 +92,7 @@ pub fn push_exe_path(mut buf: PathBuf, components: &[&str]) -> PathBuf {
         file.push_str(".exe");
     }
 
-    for c in components {
-        buf.push(c);
-    }
-
+    buf.extend(components);
     buf.push(file);
 
     buf