From 003986677fc751487717993161e04211e7e43a39 Mon Sep 17 00:00:00 2001 From: Avril Date: Fri, 11 Apr 2025 16:02:37 +0100 Subject: [PATCH] Finished pretty-formatting of extra info in help message (about version & enabled features.) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for rematch's current commit: Blessing − 吉 --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9bee47d..94b0a11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -168,14 +168,14 @@ fn main() -> eyre::Result<()> println!(""); println!("Enabled Features:"); if cfg!(feature="perl") { - println!("{}\t\t\tEnable PCRE2 (extended) regular-expressions.\n\t\t\tNote that PCRE2 regex engine matches on *bytes*, not *characters*; meaning if a match cuts a vlid UTF8 codepoint into an invalid one, the output will replace the invalid characters with U+FFFD REPLACEMENT CHARACTER.", disjoint!["+", "perl"].red()); + println!("{}\t\t\tEnable PCRE2 (extended) regular-expressions.\n\t\t\tNote that PCRE2 regex engine matches on *bytes*, not *characters*; meaning if a match cuts a vlid UTF8 codepoint into an invalid one, the output will replace the invalid characters with U+FFFD REPLACEMENT CHARACTER.", disjoint!["+", "perl"].bright_red()); } else { - println!("{}\t\t\tPCRE2 (extended) features are disabled; a faster but less featureful regular expression engine (that matches on UTF8 strings instead of raw bytes) is used instead.", disjoint!["-", "perl"].bright_blue()); + println!("{}\t\t\tPCRE2 (extended) features are disabled; a faster but less featureful regular expression engine (that matches on UTF8 strings instead of raw bytes) is used instead.", disjoint!["-", "perl"].blue()); } if cfg!(feature="unstable") { - println!("+unstable\t\tUnstable optimisations evailable & enabled for build."); + println!("{}\t\tUnstable optimisations evailable & enabled for build.", disjoint!["+", "unstable"].red()); } else { - println!("-unstable\t\tUnstable optimisations disabled / not available for build."); + println!("{}\t\tUnstable optimisations disabled / not available for build.", disjoint!["-", "unstable"].bright_blue()); } std::process::exit(1) } else {