fn load_dotenv() {
    match dotenv() {
        Ok(_) => {}
        Err(dotenv::Error::Io(err)) if err.kind() == std::io::ErrorKind::NotFound => {
            // Ignore this - a missing env file is not an error, defaults will
            // be applied when initialising the Config struct.
        }
        Err(e) => {
            eprintln!("FATAL Error loading config from: {}", e);
            eprintln!("Aborting");
            std::process::exit(1);
        }
    };
}
/// Source the .env file before initialising the Config struct - this sets
/// any envs in the file, which the Config struct then uses.
///
/// Precedence is given to existing env variables.
Source the .env file before initialising the Config struct - this sets
any envs in the file, which the Config struct then uses.

Precedence is given to existing env variables.
Source the . env file before initialising the Config struct - this sets any envs in the file which the Config struct then uses . Precedence is given to existing env variables .
fn load_dotenv() {
    match dotenv() {
        Ok(_) => {}
        Err(dotenv::Error::Io(err)) if err.kind() == std::io::ErrorKind::NotFound => {
            // Ignore this - a missing env file is not an error, defaults will
            // be applied when initialising the Config struct.
        }
        Err(e) => {
            eprintln!("FATAL Error loading config from: {}", e);
            eprintln!("Aborting");
            std::process::exit(1);
        }
    };
}
fn load_dotenv ( ) { match dotenv ( ) { Ok ( _ ) => { } Err ( dotenv :: Error :: Io ( err ) ) if err . kind ( ) == std :: io :: ErrorKind :: NotFound => { // Ignore this - a missing env file is not an error, defaults will // be applied when initialising the Config struct. } Err ( e ) => { eprintln ! ( " " e ) ; eprintln ! ( " " ) ; std :: process :: exit ( 1 ) ; } } ; }
Source the .env file before initialising the Config struct - this sets
any envs in the file, which the Config struct then uses.
Source the . env file before initialising the Config struct - this sets any envs in the file which the Config struct then uses .