about summary refs log tree commit diff
path: root/src/rustbook
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-31 20:03:04 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-02-02 13:40:18 -0500
commitfd702702ee90ddb47d207f8886818c7f91600713 (patch)
tree7bed4a4d739e1372d9e101b350297e7946f17819 /src/rustbook
parentd5f61b4332f3edd83c43f3f0d52d0381d7a6c37a (diff)
`for x in xs.into_iter()` -> `for x in xs`
Also `for x in option.into_iter()` -> `if let Some(x) = option`
Diffstat (limited to 'src/rustbook')
-rw-r--r--src/rustbook/build.rs2
-rw-r--r--src/rustbook/test.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs
index ccb572a113a..3c9c4bdedcc 100644
--- a/src/rustbook/build.rs
+++ b/src/rustbook/build.rs
@@ -177,7 +177,7 @@ impl Subcommand for Build {
             }
             Err(errors) => {
                 let n = errors.len();
-                for err in errors.into_iter() {
+                for err in errors {
                     term.err(&format!("error: {}", err)[]);
                 }
 
diff --git a/src/rustbook/test.rs b/src/rustbook/test.rs
index db02481cb02..d3cb8a7316e 100644
--- a/src/rustbook/test.rs
+++ b/src/rustbook/test.rs
@@ -64,7 +64,7 @@ impl Subcommand for Test {
                 }
             }
             Err(errors) => {
-                for err in errors.into_iter() {
+                for err in errors {
                     term.err(&err[]);
                 }
                 return Err(box "There was an error." as Box<Error>);