From ed7cd6f52215fbdd6f75538e761e70398edaebed Mon Sep 17 00:00:00 2001 From: "Peter Schilling (aider)" Date: Mon, 23 Sep 2024 20:08:43 -0700 Subject: [PATCH] style: Simplify filter condition in format_env_file --- src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ffc01c1..c9664a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -262,11 +262,9 @@ pub fn format_env_file(content: &str, prune: bool) -> Result, let mut key_value_lines: Vec = lines .into_iter() - .filter(|line| { - match line { - parser::Line::KeyValue { value, .. } => !value.is_empty(), - parser::Line::Comment(_) => !prune, - } + .filter(|line| match line { + parser::Line::KeyValue { value, .. } => !value.is_empty(), + parser::Line::Comment(_) => !prune, }) .collect();