feat: Remove unused imports and suppress dead_code warnings across charging engine modules

- Remove unused AsyncCommands/error/ChargingSession/ErrorContext imports from credit_management
- Remove unused ErrorContext/ChargingError imports from engine
- Remove unused ErrorContext import from rating_billing and prefix unused variables with underscore
- Remove unused ErrorContext import from rating_plans_repo
- Remove unused Context import from errors/helpers
- Remove unused info/debug/SystemTime imports from monitoring
- Remove unused sleep
This commit is contained in:
nutcas3
2026-04-25 01:33:20 +03:00
parent 4c14721dfc
commit 67a2c807d1
11 changed files with 22 additions and 17 deletions
@@ -1,8 +1,5 @@
use tracing::{info, debug};
use std::time::SystemTime;
use crate::errors::{ChargingError, ChargingResult, ErrorContext};
use super::types::{SystemStats, HealthStatus};
use crate::errors::ChargingResult;
impl crate::charging::ChargingEngine {
pub async fn get_performance_metrics(&self) -> ChargingResult<PerformanceMetrics> {
+2 -3
View File
@@ -1,9 +1,8 @@
use tokio::time::{interval, sleep};
use tokio::time::interval;
use tracing::{info, warn, error, debug};
use std::time::Duration;
use chrono::Datelike;
use crate::errors::{ChargingError, ChargingResult, ErrorContext, log_error};
use crate::errors::{ChargingResult, log_error};
use crate::monitoring::types::{SystemStats, HealthStatus};
impl crate::charging::ChargingEngine {
@@ -16,6 +16,7 @@ pub struct HealthStatus {
}
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct PerformanceMetrics {
pub connected_clients: u64,
pub used_memory: u64,
@@ -25,6 +26,7 @@ pub struct PerformanceMetrics {
}
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct ErrorStats {
pub total_errors: u64,
pub error_types: std::collections::HashMap<String, u64>,