From ee1b849c1b024b7361d6138d4d1e2817e39b6d08 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 16 Oct 2024 09:32:23 +0200 Subject: [PATCH] refactor: replace a match on a boolean with an if --- src/main.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index b2efafc..915362d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,13 +99,10 @@ fn main() { let mut config = Hedu::new(cli.chars, cli.skip, cli.show_identical, cli.limit); // FIXME: find a better way to get the file name // Currently, skipped sources make an extra newline here. - match config.chars { - false => { - println!("{:─^59}", format!(" {} ", cli.data_source[i])); - } - true => { - println!("{:─^80}", format!(" {} ", cli.data_source[i])); - } + if config.chars { + println!("{:─^80}", format!(" {} ", cli.data_source[i])); + } else { + println!("{:─^59}", format!(" {} ", cli.data_source[i])); } match config.dump(&mut **source) { Ok(()) => (),