From d7f9c81a2838bbbdb438a2ad4d2d74e1487407cd Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 30 Nov 2023 16:58:02 +1300 Subject: [PATCH] Add help notes on keep display --- src/main.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 24ee1280..b83eabdf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -175,6 +175,12 @@ depth is changed, regardless of any options set.", .arg( Arg::new("keep") .help("Strip all metadata except in the comma-separated list") + .long_help("\ +Strip all metadata chunks except those in the comma-separated list. The special value \ +'display' includes chunks that affect the image appearance, equivalent to '--strip safe'. + +E.g. '--keep eXIf,display' will strip chunks, keeping only eXIf and those that affect the \ +image appearance.") .long("keep") .value_name("list") .conflicts_with("strip") @@ -617,12 +623,12 @@ fn parse_opts_into_struct( let mut keep_display = false; let mut names = keep .split(',') - .filter_map(|x| { - if x == "display" { + .filter_map(|name| { + if name == "display" { keep_display = true; return None; } - Some(parse_chunk_name(x)) + Some(parse_chunk_name(name)) }) .collect::, _>>()?; if keep_display {