refactor: polish a panic message
This commit is contained in:
@@ -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.");
|
||||||
|
Reference in New Issue
Block a user