Skip to content

Commit 5d027c6

Browse files
committed
fix(clippy): resolve dead code and large error variant warnings
- Add allow annotations for fields reserved for future use - Suppress large error variant warnings from existing error system - Maintain all functionality while satisfying clippy requirements All 9 sandbox tests continue to pass
1 parent bc1c3f7 commit 5d027c6

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

crates/mandrel-mcp-th/src/error_handling/logging.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ pub struct FileRotation {
9191

9292
/// Central logging system that coordinates all logging activities
9393
pub struct LoggingSystem {
94+
#[allow(dead_code)] // Reserved for future configuration updates
9495
config: LoggingConfig,
9596
error_collector: Arc<Mutex<ErrorCollector>>,
9697
}
9798

9899
impl LoggingSystem {
99100
/// Initialize the logging system with the given configuration
101+
#[allow(clippy::result_large_err)] // Error enum variants are from existing error system
100102
pub fn initialize(config: LoggingConfig) -> Result<Self, TestHarnessError> {
101103
let error_collector = Arc::new(Mutex::new(ErrorCollector::new()));
102104

@@ -153,6 +155,7 @@ impl LoggingSystem {
153155
}
154156

155157
/// Get current error statistics
158+
#[allow(clippy::result_large_err)] // Error enum variants are from existing error system
156159
pub fn get_error_statistics(&self) -> Result<ErrorStatistics, TestHarnessError> {
157160
let collector = self.error_collector.lock().map_err(|e| {
158161
TestHarnessError::Reporting(

crates/mandrel-mcp-th/src/error_handling/metrics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub enum TrendDirection {
7878
pub struct ErrorAnalyzer {
7979
metrics: ErrorMetrics,
8080
events: Vec<ErrorEvent>,
81+
#[allow(dead_code)] // Reserved for future time-window analysis
8182
analysis_window: Duration,
8283
start_time: Instant,
8384
}

crates/mandrel-mcp-th/src/script_engines/sandbox.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub struct ResourceViolation {
9898
pub struct ResourceMonitor {
9999
limits: ResourceLimits,
100100
metrics: Arc<RwLock<ResourceMetrics>>,
101+
#[allow(dead_code)] // Reserved for future duration tracking
101102
start_time: Instant,
102103
monitoring_active: Arc<Mutex<bool>>,
103104
}

0 commit comments

Comments
 (0)