diff --git a/services/api_gateway/src/main.rs b/services/api_gateway/src/main.rs index 556f71879..78eb92282 100644 --- a/services/api_gateway/src/main.rs +++ b/services/api_gateway/src/main.rs @@ -235,9 +235,8 @@ async fn main() -> Result<()> { }; // Initialize configuration manager (requires database) - let database_url = std::env::var("DATABASE_URL").unwrap_or_else(|_| { - "postgresql://foxhunt:foxhunt_dev_password@localhost:5432/foxhunt".to_string() - }); + let database_url = std::env::var("DATABASE_URL") + .map_err(|_| anyhow::anyhow!("DATABASE_URL environment variable must be set"))?; let db_pool = sqlx::PgPool::connect(&database_url) .await .map_err(|e| anyhow::anyhow!("Failed to connect to database: {}", e))?; diff --git a/services/broker_gateway_service/src/lib.rs b/services/broker_gateway_service/src/lib.rs index 09ba66519..3ee75c5e1 100644 --- a/services/broker_gateway_service/src/lib.rs +++ b/services/broker_gateway_service/src/lib.rs @@ -3,6 +3,7 @@ //! Provides broker connectivity for order routing via FIX protocol. #![deny(warnings)] +#![deny(clippy::unwrap_used, clippy::expect_used)] pub mod proto { pub mod broker_gateway { diff --git a/services/broker_gateway_service/src/main.rs b/services/broker_gateway_service/src/main.rs index 47b4806e8..9e678609e 100644 --- a/services/broker_gateway_service/src/main.rs +++ b/services/broker_gateway_service/src/main.rs @@ -32,7 +32,7 @@ async fn main() -> Result<()> { // Get database URL from environment let database_url = std::env::var("DATABASE_URL") - .unwrap_or_else(|_| "postgresql://foxhunt:foxhunt_dev_password@localhost:5432/foxhunt".to_string()); + .context("DATABASE_URL environment variable must be set")?; // Initialize database pool let db_pool = PgPool::connect(&database_url)