From 2b1e644ead40145f0b1b84f286b48948fb314311 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 30 Aug 2020 02:41:15 +0200 Subject: diff_options: Merge `FLAGS` and `OPTIONS` Didn't look closely enough in d9b8838a5d99e643a751d042047644cfa4a9a032, but we now have the exact same handling for key-value options and flags. --- src/diff_options.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/diff_options.rs b/src/diff_options.rs index 55b76ce..3c19634 100644 --- a/src/diff_options.rs +++ b/src/diff_options.rs @@ -14,7 +14,7 @@ // along with this program. If not, see . -static FLAGS: [&'static str; 59] = [ +static FLAGS: [&'static str; 98] = [ "-p", "--no-stat", "-p", @@ -74,9 +74,6 @@ static FLAGS: [&'static str; 59] = [ "--no-textconv", "--no-prefix", "--ita-invisible-in-index", -]; - -static OPTIONS: [&'static str; 39] = [ "-U", "--unified", "--output", @@ -132,14 +129,6 @@ pub fn parse(args: &[String]) -> (Vec<&String>, Vec<&String>) { } } - for option in OPTIONS.iter() { - if arg.starts_with(option) { - found_args.push(arg); - - continue 'args; - } - } - program_args.push(arg) } -- cgit v1.2.3