mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-12 23:15:14 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user