fn create_example_config_file(path: &Path) -> std::io::Result<()> {
    if !path.exists() {
        let mut file = std::fs::File::create(path)?;
        file.write_all(
            toml::to_string_pretty(&Config::default())
                .expect("default config not serializable")
                .as_bytes(),
        )?;
    }
    Ok(())
}
/// Create example config file at path if one does not exist.
Create example config file at path if one does not exist.
Create example config file at path if one does not exist .
fn create_example_config_file(path: &Path) -> std::io::Result<()> {
    if !path.exists() {
        let mut file = std::fs::File::create(path)?;
        file.write_all(
            toml::to_string_pretty(&Config::default())
                .expect("default config not serializable")
                .as_bytes(),
        )?;
    }
    Ok(())
}
fn create_example_config_file ( path : & Path ) -> std :: io :: Result < ( ) > { if ! path . exists ( ) { let mut file = std :: fs :: File :: create ( path ) ? ; file . write_all ( toml :: to_string_pretty ( & Config :: default ( ) ) . expect ( " " ) . as_bytes ( ) , ) ? ; } Ok ( ( ) ) }
Create example config file at path if one does not exist.
Create example config file at path if one does not exist .
path
&Path
path
&Path