refactor: polish a panic message
This commit is contained in:
parent
8220c3fb35
commit
4aef1e7ef5
@ -4,7 +4,7 @@ use dotenvy::dotenv;
|
|||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
pub(crate) fn establish_database_connection() -> ConnectionResult<PgConnection> {
|
pub(crate) fn establish_database_connection() -> ConnectionResult<PgConnection> {
|
||||||
dotenv().expect("Could not load environment variables.");
|
dotenv().expect("Could not load environment variables from the .env file.");
|
||||||
|
|
||||||
let database_url =
|
let database_url =
|
||||||
env::var("DATABASE_URL").expect("The environment variable DATABASE_URL has to be set.");
|
env::var("DATABASE_URL").expect("The environment variable DATABASE_URL has to be set.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user