diff --git a/src/analytics/analyze.rs b/src/analytics/analyze.rs index 184d31f..dc1fbaa 100644 --- a/src/analytics/analyze.rs +++ b/src/analytics/analyze.rs @@ -7,6 +7,12 @@ use crate::models::metrics::Metrics; pub struct DealAnalyzer; +impl Default for DealAnalyzer { + fn default() -> Self { + Self::new() + } +} + impl DealAnalyzer { pub fn new() -> Self { Self diff --git a/src/analytics/extract.rs b/src/analytics/extract.rs index cf95ed5..945646f 100644 --- a/src/analytics/extract.rs +++ b/src/analytics/extract.rs @@ -8,6 +8,12 @@ use crate::models::{Deal, Metrics}; pub struct ReportExtractor; +impl Default for ReportExtractor { + fn default() -> Self { + Self::new() + } +} + impl ReportExtractor { pub fn new() -> Self { Self diff --git a/src/main.rs b/src/main.rs index 0b1f38a..3efea36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,10 +7,10 @@ use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; use tokio::net::TcpListener; use tracing::{error, info}; +use mt5_quant::mcp_server::{McpServer, Notification}; use mt5_quant::models::Config; use mt5_quant::pipeline::backtest::{BacktestParams, BacktestPipeline}; -use mt5_quant::mcp_server::{McpServer, Notification}; -use mt5_quant::{McpRequest, McpResponse, McpError}; +use mt5_quant::{McpError, McpRequest, McpResponse}; #[derive(Parser)] #[command(name = "mt5-quant")] diff --git a/src/mcp_server.rs b/src/mcp_server.rs index c14971c..6e97b79 100644 --- a/src/mcp_server.rs +++ b/src/mcp_server.rs @@ -31,6 +31,12 @@ pub struct McpServer { notification_tx: Arc>>>, } +impl Default for McpServer { + fn default() -> Self { + Self::new() + } +} + impl McpServer { pub fn new() -> Self { let config = ModelsConfig::load().unwrap_or_default(); diff --git a/src/optimization/parser.rs b/src/optimization/parser.rs index 7016f86..d84652b 100644 --- a/src/optimization/parser.rs +++ b/src/optimization/parser.rs @@ -17,6 +17,12 @@ pub struct OptimizationPass { pub struct OptimizationParser; +impl Default for OptimizationParser { + fn default() -> Self { + Self::new() + } +} + impl OptimizationParser { pub fn new() -> Self { Self diff --git a/src/pipeline/stages.rs b/src/pipeline/stages.rs index 4eb0faa..34bdf97 100644 --- a/src/pipeline/stages.rs +++ b/src/pipeline/stages.rs @@ -40,6 +40,13 @@ impl Stage { #[allow(dead_code)] pub struct StageExecutor; +#[allow(dead_code)] +impl Default for StageExecutor { + fn default() -> Self { + Self::new() + } +} + #[allow(dead_code)] impl StageExecutor { pub fn new() -> Self {