From b26272ba3e9067197e0aff16ba2ce8780e0acb96 Mon Sep 17 00:00:00 2001
From: Akshay <nerdy@peppe.rs>
Date: Tue, 19 Oct 2021 22:27:23 +0530
Subject: minor refactor

---
 bin/src/main.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'bin/src')

diff --git a/bin/src/main.rs b/bin/src/main.rs
index a3f04d7..161dcab 100644
--- a/bin/src/main.rs
+++ b/bin/src/main.rs
@@ -21,14 +21,14 @@ fn _main() -> Result<(), StatixErr> {
             let vfs = lint_config.vfs()?;
             let (reports, errors): (Vec<_>, Vec<_>) =
                 vfs.iter().map(lint::lint).partition(Result::is_ok);
-            let lint_results: Vec<_> = reports.into_iter().map(Result::unwrap).collect();
-            let errors: Vec<_> = errors.into_iter().map(Result::unwrap_err).collect();
+            let lint_results = reports.into_iter().map(Result::unwrap);
+            let errors = errors.into_iter().map(Result::unwrap_err);
 
             let mut stderr = io::stderr();
-            lint_results.into_iter().for_each(|r| {
+            lint_results.for_each(|r| {
                 stderr.write(&r, &vfs).unwrap();
             });
-            errors.into_iter().for_each(|e| {
+            errors.for_each(|e| {
                 eprintln!("{}", e);
             });
         }
-- 
cgit v1.2.3