mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-30 08:32:15 +00:00
refactor: Remove unnecessary clone() calls and improve error handling in packet-gateway
- Remove clone() from rating plan parameter in add_rating_plan call - Remove clone() calls from ChargingEngineClient and EbpfManager initialization - Remove clone() from Redis client Arc wrapping - Remove clone() calls from PacketGatewayConfig field assignments - Replace expect() with proper error handling using map_err and anyhow in health check server - Remove clone() from IP string in session data collection
This commit is contained in:
@@ -66,7 +66,7 @@ pub async fn add_rating_plan(
|
||||
sms_limit: req.get("sms_limit").and_then(|v| v.as_u64()).unwrap_or(100),
|
||||
};
|
||||
|
||||
state.charging_engine.add_rating_plan(plan.clone()).await
|
||||
state.charging_engine.add_rating_plan(plan).await
|
||||
.with_context("Failed to add rating plan")?;
|
||||
|
||||
Ok(Json(serde_json::json!({
|
||||
|
||||
Reference in New Issue
Block a user