Files
foxhunt/services/ml_training_service/src/grpc
jgrusewski c79cca5564 chore(clippy): add deny(unwrap_used) to ml_training_service, fix 58 violations
Add #![deny(clippy::unwrap_used, clippy::expect_used)] to lib.rs and main.rs.

Fix all violations by category:
- training_metrics.rs / simple_metrics.rs: file-level #![allow] with safety
  comment (Prometheus register_*!() macros with literal names are infallible)
- asset_parser.rs: function-level #[allow] for invariant regex literal expect()
- technical_indicators.rs: replace unwrap() on VecDeque::back()/get() with
  let-else early returns
- data_config.rs: bind start/end before assigning to avoid unwrap()
- data_loader.rs: convert 3x database.as_ref().expect() to .ok_or_else()?;
  fix Price construction chain with .or_else().map_err()?
- dbn_data_loader.rs: fix Price::from_f64().unwrap_or_else() chains with
  .or_else().unwrap_or_default()
- checkpoint_manager.rs: convert serde_json::to_value().unwrap() to .map_err()?
- orchestrator.rs: use unwrap_or_default() for Price in map() closures
- main.rs: fix rustls expect, metrics encoder, spawn closure error handling
- validation_pipeline.rs: fix path UTF-8 expect and last().expect() calls
- batch_tuning_manager.rs: fix current_dir().expect() with unwrap_or_else
- All test modules: add #[allow(clippy::unwrap_used, clippy::expect_used)]

Result: ml_training_service generates zero clippy warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:56:22 +01:00
..