fn merge_config(conf: &mut Self, new: Self) {
        // does not include the following Configuration fields, as they don't make sense here
        //  - kind
        //  - client
        //  - replay_client
        //  - resumed
        //  - config
        update_if_not_default!(&mut conf.target_url, new.target_url, "");
        update_if_not_default!(&mut conf.time_limit, new.time_limit, "");
        update_if_not_default!(&mut conf.proxy, new.proxy, "");
        update_if_not_default!(&mut conf.verbosity, new.verbosity, 0);
        update_if_not_default!(&mut conf.silent, new.silent, false);
        update_if_not_default!(&mut conf.quiet, new.quiet, false);
        update_if_not_default!(&mut conf.auto_bail, new.auto_bail, false);
        update_if_not_default!(&mut conf.auto_tune, new.auto_tune, false);
        // use updated quiet/silent values to determine output level; same for requester policy
        conf.output_level = determine_output_level(conf.quiet, conf.silent);
        conf.requester_policy = determine_requester_policy(conf.auto_tune, conf.auto_bail);
        update_if_not_default!(&mut conf.output, new.output, "");
        update_if_not_default!(&mut conf.redirects, new.redirects, false);
        update_if_not_default!(&mut conf.insecure, new.insecure, false);
        update_if_not_default!(&mut conf.extract_links, new.extract_links, false);
        update_if_not_default!(&mut conf.extensions, new.extensions, Vec::<String>::new());
        update_if_not_default!(&mut conf.url_denylist, new.url_denylist, Vec::<Url>::new());
        if !new.regex_denylist.is_empty() {
            // cant use the update_if_not_default macro due to the following error
            //
            //    binary operation `!=` cannot be applied to type `Vec<regex::Regex>`
            //
            // if we get a non-empty list of regex in the new config, override the old
            conf.regex_denylist = new.regex_denylist;
        }
        update_if_not_default!(&mut conf.headers, new.headers, HashMap::new());
        update_if_not_default!(&mut conf.queries, new.queries, Vec::new());
        update_if_not_default!(&mut conf.no_recursion, new.no_recursion, false);
        update_if_not_default!(&mut conf.add_slash, new.add_slash, false);
        update_if_not_default!(&mut conf.stdin, new.stdin, false);
        update_if_not_default!(&mut conf.filter_size, new.filter_size, Vec::<u64>::new());
        update_if_not_default!(
            &mut conf.filter_regex,
            new.filter_regex,
            Vec::<String>::new()
        );
        update_if_not_default!(
            &mut conf.filter_similar,
            new.filter_similar,
            Vec::<String>::new()
        );
        update_if_not_default!(
            &mut conf.filter_word_count,
            new.filter_word_count,
            Vec::<usize>::new()
        );
        update_if_not_default!(
            &mut conf.filter_line_count,
            new.filter_line_count,
            Vec::<usize>::new()
        );
        update_if_not_default!(
            &mut conf.filter_status,
            new.filter_status,
            Vec::<u16>::new()
        );
        update_if_not_default!(&mut conf.dont_filter, new.dont_filter, false);
        update_if_not_default!(&mut conf.scan_limit, new.scan_limit, 0);
        update_if_not_default!(&mut conf.parallel, new.parallel, 0);
        update_if_not_default!(&mut conf.rate_limit, new.rate_limit, 0);
        update_if_not_default!(&mut conf.replay_proxy, new.replay_proxy, "");
        update_if_not_default!(&mut conf.debug_log, new.debug_log, "");
        update_if_not_default!(&mut conf.resume_from, new.resume_from, "");
        update_if_not_default!(&mut conf.json, new.json, false);

        update_if_not_default!(&mut conf.timeout, new.timeout, timeout());
        update_if_not_default!(&mut conf.user_agent, new.user_agent, user_agent());
        update_if_not_default!(&mut conf.random_agent, new.random_agent, false);
        update_if_not_default!(&mut conf.threads, new.threads, threads());
        update_if_not_default!(&mut conf.depth, new.depth, depth());
        update_if_not_default!(&mut conf.wordlist, new.wordlist, wordlist());
        update_if_not_default!(&mut conf.status_codes, new.status_codes, status_codes());
        // status_codes() is the default for replay_codes, if they're not provided
        update_if_not_default!(&mut conf.replay_codes, new.replay_codes, status_codes());
        update_if_not_default!(&mut conf.save_state, new.save_state, save_state());
    }
/// Given two Configurations, overwrite `settings` with the fields found in `settings_to_merge`
Given two Configurations, overwrite `settings` with the fields found in `settings_to_merge`
Given two Configurations overwrite ` settings ` with the fields found in ` settings_to_merge `
fn merge_config(conf: &mut Self, new: Self) {
        // does not include the following Configuration fields, as they don't make sense here
        //  - kind
        //  - client
        //  - replay_client
        //  - resumed
        //  - config
        update_if_not_default!(&mut conf.target_url, new.target_url, "");
        update_if_not_default!(&mut conf.time_limit, new.time_limit, "");
        update_if_not_default!(&mut conf.proxy, new.proxy, "");
        update_if_not_default!(&mut conf.verbosity, new.verbosity, 0);
        update_if_not_default!(&mut conf.silent, new.silent, false);
        update_if_not_default!(&mut conf.quiet, new.quiet, false);
        update_if_not_default!(&mut conf.auto_bail, new.auto_bail, false);
        update_if_not_default!(&mut conf.auto_tune, new.auto_tune, false);
        // use updated quiet/silent values to determine output level; same for requester policy
        conf.output_level = determine_output_level(conf.quiet, conf.silent);
        conf.requester_policy = determine_requester_policy(conf.auto_tune, conf.auto_bail);
        update_if_not_default!(&mut conf.output, new.output, "");
        update_if_not_default!(&mut conf.redirects, new.redirects, false);
        update_if_not_default!(&mut conf.insecure, new.insecure, false);
        update_if_not_default!(&mut conf.extract_links, new.extract_links, false);
        update_if_not_default!(&mut conf.extensions, new.extensions, Vec::<String>::new());
        update_if_not_default!(&mut conf.url_denylist, new.url_denylist, Vec::<Url>::new());
        if !new.regex_denylist.is_empty() {
            // cant use the update_if_not_default macro due to the following error
            //
            //    binary operation `!=` cannot be applied to type `Vec<regex::Regex>`
            //
            // if we get a non-empty list of regex in the new config, override the old
            conf.regex_denylist = new.regex_denylist;
        }
        update_if_not_default!(&mut conf.headers, new.headers, HashMap::new());
        update_if_not_default!(&mut conf.queries, new.queries, Vec::new());
        update_if_not_default!(&mut conf.no_recursion, new.no_recursion, false);
        update_if_not_default!(&mut conf.add_slash, new.add_slash, false);
        update_if_not_default!(&mut conf.stdin, new.stdin, false);
        update_if_not_default!(&mut conf.filter_size, new.filter_size, Vec::<u64>::new());
        update_if_not_default!(
            &mut conf.filter_regex,
            new.filter_regex,
            Vec::<String>::new()
        );
        update_if_not_default!(
            &mut conf.filter_similar,
            new.filter_similar,
            Vec::<String>::new()
        );
        update_if_not_default!(
            &mut conf.filter_word_count,
            new.filter_word_count,
            Vec::<usize>::new()
        );
        update_if_not_default!(
            &mut conf.filter_line_count,
            new.filter_line_count,
            Vec::<usize>::new()
        );
        update_if_not_default!(
            &mut conf.filter_status,
            new.filter_status,
            Vec::<u16>::new()
        );
        update_if_not_default!(&mut conf.dont_filter, new.dont_filter, false);
        update_if_not_default!(&mut conf.scan_limit, new.scan_limit, 0);
        update_if_not_default!(&mut conf.parallel, new.parallel, 0);
        update_if_not_default!(&mut conf.rate_limit, new.rate_limit, 0);
        update_if_not_default!(&mut conf.replay_proxy, new.replay_proxy, "");
        update_if_not_default!(&mut conf.debug_log, new.debug_log, "");
        update_if_not_default!(&mut conf.resume_from, new.resume_from, "");
        update_if_not_default!(&mut conf.json, new.json, false);
        update_if_not_default!(&mut conf.timeout, new.timeout, timeout());
        update_if_not_default!(&mut conf.user_agent, new.user_agent, user_agent());
        update_if_not_default!(&mut conf.random_agent, new.random_agent, false);
        update_if_not_default!(&mut conf.threads, new.threads, threads());
        update_if_not_default!(&mut conf.depth, new.depth, depth());
        update_if_not_default!(&mut conf.wordlist, new.wordlist, wordlist());
        update_if_not_default!(&mut conf.status_codes, new.status_codes, status_codes());
        // status_codes() is the default for replay_codes, if they're not provided
        update_if_not_default!(&mut conf.replay_codes, new.replay_codes, status_codes());
        update_if_not_default!(&mut conf.save_state, new.save_state, save_state());
    }
fn merge_config ( conf : & mut Self , new : Self ) { // does not include the following Configuration fields, as they don't make sense here //  - kind //  - client //  - replay_client //  - resumed //  - config update_if_not_default ! ( mut conf target_url new target_url " " ) ; update_if_not_default ! ( mut conf time_limit new time_limit " " ) ; update_if_not_default ! ( mut conf proxy new proxy " " ) ; update_if_not_default ! ( mut conf verbosity new verbosity 0 ) ; update_if_not_default ! ( mut conf silent new silent false ) ; update_if_not_default ! ( mut conf quiet new quiet false ) ; update_if_not_default ! ( mut conf auto_bail new auto_bail false ) ; update_if_not_default ! ( mut conf auto_tune new auto_tune false ) ; // use updated quiet/silent values to determine output level; same for requester policy conf . output_level = determine_output_level ( conf . quiet , conf . silent ) ; conf . requester_policy = determine_requester_policy ( conf . auto_tune , conf . auto_bail ) ; update_if_not_default ! ( mut conf output new output " " ) ; update_if_not_default ! ( mut conf redirects new redirects false ) ; update_if_not_default ! ( mut conf insecure new insecure false ) ; update_if_not_default ! ( mut conf extract_links new extract_links false ) ; update_if_not_default ! ( mut conf extensions new extensions Vec String new ( ) ) ; update_if_not_default ! ( mut conf url_denylist new url_denylist Vec Url new ( ) ) ; if ! new . regex_denylist . is_empty ( ) { // cant use the update_if_not_default macro due to the following error // //    binary operation `!=` cannot be applied to type `Vec<regex::Regex>` // // if we get a non-empty list of regex in the new config, override the old conf . regex_denylist = new . regex_denylist ; } update_if_not_default ! ( mut conf headers new headers HashMap new ( ) ) ; update_if_not_default ! ( mut conf queries new queries Vec new ( ) ) ; update_if_not_default ! ( mut conf no_recursion new no_recursion false ) ; update_if_not_default ! ( mut conf add_slash new add_slash false ) ; update_if_not_default ! ( mut conf stdin new stdin false ) ; update_if_not_default ! ( mut conf filter_size new filter_size Vec u64 new ( ) ) ; update_if_not_default ! ( mut conf filter_regex new filter_regex Vec String new ( ) ) ; update_if_not_default ! ( mut conf filter_similar new filter_similar Vec String new ( ) ) ; update_if_not_default ! ( mut conf filter_word_count new filter_word_count Vec usize new ( ) ) ; update_if_not_default ! ( mut conf filter_line_count new filter_line_count Vec usize new ( ) ) ; update_if_not_default ! ( mut conf filter_status new filter_status Vec u16 new ( ) ) ; update_if_not_default ! ( mut conf dont_filter new dont_filter false ) ; update_if_not_default ! ( mut conf scan_limit new scan_limit 0 ) ; update_if_not_default ! ( mut conf parallel new parallel 0 ) ; update_if_not_default ! ( mut conf rate_limit new rate_limit 0 ) ; update_if_not_default ! ( mut conf replay_proxy new replay_proxy " " ) ; update_if_not_default ! ( mut conf debug_log new debug_log " " ) ; update_if_not_default ! ( mut conf resume_from new resume_from " " ) ; update_if_not_default ! ( mut conf json new json false ) ; update_if_not_default ! ( mut conf timeout new timeout timeout ( ) ) ; update_if_not_default ! ( mut conf user_agent new user_agent user_agent ( ) ) ; update_if_not_default ! ( mut conf random_agent new random_agent false ) ; update_if_not_default ! ( mut conf threads new threads threads ( ) ) ; update_if_not_default ! ( mut conf depth new depth depth ( ) ) ; update_if_not_default ! ( mut conf wordlist new wordlist wordlist ( ) ) ; update_if_not_default ! ( mut conf status_codes new status_codes status_codes ( ) ) ; // status_codes() is the default for replay_codes, if they're not provided update_if_not_default ! ( mut conf replay_codes new replay_codes status_codes ( ) ) ; update_if_not_default ! ( mut conf save_state new save_state save_state ( ) ) ; }
Given two Configurations, overwrite `settings` with the fields found in `settings_to_merge`
Given two Configurations overwrite ` settings ` with the fields found in ` settings_to_merge `
conf
&mut Self
new
Self