From da974e4d4ce45ee7798b53b52b3a152dfb56eaae Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 30 Aug 2020 02:50:28 +0200 Subject: diff_options::parse(): Rename `found_args` to `diff_args` Now that I added `program_args`, reading this back over I realised `found_args` didn't convey enough information about what it contains. --- src/diff_options.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diff_options.rs b/src/diff_options.rs index 3c19634..2a5edcb 100644 --- a/src/diff_options.rs +++ b/src/diff_options.rs @@ -118,12 +118,12 @@ static FLAGS: [&'static str; 98] = [ pub fn parse(args: &[String]) -> (Vec<&String>, Vec<&String>) { let mut program_args = Vec::new(); - let mut found_args = Vec::new(); + let mut diff_args = Vec::new(); 'args: for arg in args { for flag in FLAGS.iter() { if arg.starts_with(flag) { - found_args.push(arg); + diff_args.push(arg); continue 'args; } @@ -132,7 +132,7 @@ pub fn parse(args: &[String]) -> (Vec<&String>, Vec<&String>) { program_args.push(arg) } - (program_args, found_args) + (program_args, diff_args) } -- cgit v1.2.3