summaryrefslogtreecommitdiffstats
path: root/src/commands/build.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-01-13 09:56:44 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-15 23:21:39 +0100
commita6dbffa338d49cd676f752cd50f44d8ebc015a07 (patch)
treec756fdf5f3b78a32f5a22bf23ffed3a16d200d9b /src/commands/build.rs
parent0f03fd099255d5ab0ad673044fe78ebe31b5beab (diff)
Fix clippy: `.map().collect()` can be replaced with `.try_for_each()`
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/commands/build.rs')
-rw-r--r--src/commands/build.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs
index 44ac327..ac0765f 100644
--- a/src/commands/build.rs
+++ b/src/commands/build.rs
@@ -352,10 +352,9 @@ pub async fn build(repo_root: &Path,
lines.len()
}
})
- .map(|(i, line)| {
+ .try_for_each(|(i, line)| {
writeln!(outlock, "{:>4} | {}", i, line).map_err(Error::from)
- })
- .collect::<Result<()>>()?;
+ })?;
writeln!(outlock, "\n\n")?;
if error_catched {