Skip to main content

compute_merged_options

Function compute_merged_options 

Source
fn compute_merged_options(
    current_options: &str,
    source_options: &BTreeMap<String, CmdlineOwned>,
    target_source: &SourceName,
    new_options: Option<&str>,
) -> CmdlineOwned
Expand description

Compute the merged options line from all sources.

The algorithm:

  1. Start with the current options line
  2. Remove all options that belong to the old value of the specified source
  3. Add the new options for the specified source

Options not tracked by any source are preserved as-is.