Files
foxhunt/trading-data
jgrusewski 1ece987396 chore(clippy): add deny(unwrap_used) to 4 low-violation crates and fix 13 violations
Add #![deny(clippy::unwrap_used, clippy::expect_used)] to database, ml-data,
trading-data, and broker_gateway_service crates, fixing all violations:

- database/src/transaction.rs: replace 7x .expect("Transaction already consumed")
  with .ok_or_else(|| DatabaseError::Transaction) and 2x .unwrap() on take()
  in commit/rollback with safe .ok_or_else() variants
- ml-data/src/performance.rs: replace .last().unwrap() and .first().unwrap()
  with if-let destructuring pattern
- trading-data/src/positions.rs: replace 3x write!().unwrap() with let _ = write!()
  and Decimal::from_str_exact("0.02").unwrap() with Decimal::new(2, 2)
- trading-data/src/executions.rs: replace 3x write!().unwrap() with let _ = write!(),
  and 3x .expect() on and_hms_opt(0,0,0) with .unwrap_or_default()
- broker_gateway_service/src/main.rs: replace encode().unwrap() with if-let,
  and from_utf8().unwrap() with .unwrap_or_else()
- Add #[allow(clippy::unwrap_used)] to test modules in all affected crates

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