feat(clap_complete_fig): Switch to using `ArgAction`
@@ -216,8 +216,9 @@ fn gen_options(cmd: &Command, indent: usize) -> String {
buffer.push_str(&format!("{:indent$}],\n", "", indent = indent + 4));
}
- #[allow(deprecated)]
- if option.is_multiple_occurrences_set() {
+ if let ArgAction::Set | ArgAction::Append | ArgAction::Count =
+ option.get_action()
+ {
buffer.push_str(&format!(
"{:indent$}isRepeatable: true,\n",
"",
@@ -304,8 +305,9 @@ fn gen_options(cmd: &Command, indent: usize) -> String {
buffer.push_str(&format!("{:indent$}],\n", "", indent = indent + 4));
}
- #[allow(deprecated)]
- if flag.is_multiple_occurrences_set() {
+ if let ArgAction::Set | ArgAction::Append | ArgAction::Count =
+ flag.get_action()
+ {
buffer.push_str(&format!(
"{:indent$}isRepeatable: true,\n",
"",
