Skip to main content

reconcile_bool_pairs

Function reconcile_bool_pairs 

Source
pub fn reconcile_bool_pairs(
    matches: &ArgMatches,
    bool_pairs: &[BoolFlagPair],
) -> HashMap<String, Value>
Expand description

Reconcile –flag / –no-flag boolean pairs from ArgMatches into bool values.

For each BoolFlagPair:

  • If –flag was set → prop_name = true
  • If –no-flag set → prop_name = false
  • If neither → prop_name = default_val