fn read_config_from_path<P: AsRef<path::Path>>(config_file_path: P) -> Result<Config, ConfigReadError> {
    let file_data = fs::read(config_file_path)?;
    let config = toml::from_slice::<UnverifiedConfig>(&file_data)?;

    Ok(Config {
        general: config.general,
        game: config.game.verify()?,
    })
}
/// Load configuration from a file except that part isn't implemented yet.
Load configuration from a file except that part isn't implemented yet.
Load configuration from a file except that part isn ' t implemented yet .
fn read_config_from_path<P: AsRef<path::Path>>(config_file_path: P) -> Result<Config, ConfigReadError> {
    let file_data = fs::read(config_file_path)?;
    let config = toml::from_slice::<UnverifiedConfig>(&file_data)?;
    Ok(Config {
        general: config.general,
        game: config.game.verify()?,
    })
}
fn read_config_from_path < P : AsRef < path :: Path > > ( config_file_path : P ) -> Result < Config , ConfigReadError > { let file_data = fs :: read ( config_file_path ) ? ; let config = toml :: from_slice :: < UnverifiedConfig > ( & file_data ) ? ; Ok ( Config { general : config . general , game : config . game . verify ( ) ? , } ) }
Load configuration from a file except that part isn't implemented yet.
Load configuration from a file except that part isn ' t implemented yet .
config_file_path
P
config_file_path
P