refactor: Fix Rust edition, remove duplicate lint rule, and improve error handling in charging-engine and packet-gateway

- Change Rust edition from "2026" to "2024" in workspace Cargo.toml
- Remove duplicate expect_used lint rule from workspace lints
- Prefix unused account variable with underscore in calculate_usage_cost
- Split CARGO_MANIFEST_DIR assignment into separate variable in run_migrations
- Clone plan_id before moving plan in add_rating_plan handler
- Replace expect() with unwrap() in governor
This commit is contained in:
nutcas3
2026-04-30 03:17:46 +03:00
parent cd392894df
commit 9b64366e25
6 changed files with 12 additions and 11 deletions
+3 -3
View File
@@ -88,7 +88,7 @@ async fn main() -> Result<()> {
info!("Connected to Redis successfully");
// Initialize charging engine client
let charging_client = ChargingEngineClient::new(&args.charging_engine_url);
let charging_client = ChargingEngineClient::new(args.charging_engine_url.clone());
info!("Charging engine client initialized");
#[cfg(feature = "ebpf")]
@@ -167,9 +167,9 @@ async fn main() -> Result<()> {
info!("Health check server listening on {}", addr);
let listener = tokio::net::TcpListener::bind(&addr).await
.map_err(|e| anyhow::anyhow!("Failed to bind health check server: {}", e))?;
.expect("Failed to bind health check server");
axum::serve(listener, app).await
.map_err(|e| anyhow::anyhow!("Failed to start health check server: {}", e))?;
.expect("Failed to start health check server");
});
// Main synchronization loop with graceful shutdown