From 0b535b11bb03e4984cc2789a3e85f93989725e9a Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 28 Jan 2022 19:21:19 +0530 Subject: apply style suggestion --- bin/src/lint.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'bin/src') diff --git a/bin/src/lint.rs b/bin/src/lint.rs index 4a8c540..a345558 100644 --- a/bin/src/lint.rs +++ b/bin/src/lint.rs @@ -61,13 +61,10 @@ pub mod main { let lint = |vfs_entry| lint_with(vfs_entry, &lints, &session); let results = vfs.iter().map(lint).collect::>(); - if results.len() != 0 { - for r in &results { - stdout.write(&r, &vfs, check_config.format).unwrap(); - } - std::process::exit(1); + for r in &results { + stdout.write(&r, &vfs, check_config.format).unwrap(); } - std::process::exit(0); + std::process::exit(if results.is_empty() { 0 } else { 1 }); } } -- cgit v1.2.3