fn parse_and_merge_config(config_file: PathBuf, mut config: &mut Self) -> Result<()> {
        if config_file.exists() {
            // save off a string version of the path before it goes out of scope
            let conf_str = config_file.to_str().unwrap_or("").to_string();
            let settings = Self::parse_config(config_file)?;

            // set the config used for viewing in the banner
            config.config = conf_str;

            // update the settings
            Self::merge_config(&mut config, settings);
        }
        Ok(())
    }
/// Given a configuration file's location and an instance of `Configuration`, read in
/// the config file if found and update the current settings with the settings found therein
Given a configuration file's location and an instance of `Configuration`, read in
the config file if found and update the current settings with the settings found therein
Given a configuration file ' s location and an instance of ` Configuration ` read in the config file if found and update the current settings with the settings found therein
fn parse_and_merge_config(config_file: PathBuf, mut config: &mut Self) -> Result<()> {
        if config_file.exists() {
            // save off a string version of the path before it goes out of scope
            let conf_str = config_file.to_str().unwrap_or("").to_string();
            let settings = Self::parse_config(config_file)?;
            // set the config used for viewing in the banner
            config.config = conf_str;
            // update the settings
            Self::merge_config(&mut config, settings);
        }
        Ok(())
    }
fn parse_and_merge_config ( config_file : PathBuf , mut config : & mut Self ) -> Result < ( ) > { if config_file . exists ( ) { // save off a string version of the path before it goes out of scope let conf_str = config_file . to_str ( ) . unwrap_or ( " " ) . to_string ( ) ; let settings = Self :: parse_config ( config_file ) ? ; // set the config used for viewing in the banner config . config = conf_str ; // update the settings Self :: merge_config ( & mut config , settings ) ; } Ok ( ( ) ) }
Given a configuration file's location and an instance of `Configuration`, read in
the config file if found and update the current settings with the settings found therein
Given a configuration file ' s location and an instance of ` Configuration ` read in the config file if found and update the current settings with the settings found therein
config_file
PathBuf
config
&mut Self