chore(clippy): add deny(unwrap_used) to 4 zero-violation crates
Add #![deny(clippy::unwrap_used, clippy::expect_used)] to: - market-data/src/lib.rs - model_loader/src/lib.rs - risk-data/src/lib.rs - services/data_acquisition_service/src/lib.rs Add #[allow(clippy::unwrap_used, clippy::expect_used)] to all cfg(test) modules in each crate and their sub-files to preserve existing test patterns without introducing false positives. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
//! for the Foxhunt HFT Trading System. It offers clean abstractions for storing
|
||||
//! and retrieving price data, order book data, and technical indicators.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
||||
|
||||
pub mod error;
|
||||
pub mod indicators;
|
||||
pub mod models;
|
||||
@@ -11,6 +13,7 @@ pub mod orderbook;
|
||||
pub mod prices;
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod compile_test;
|
||||
|
||||
/// Database schema creation helper functions
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
//! Provides ML model loading from S3 with LRU caching and version management.
|
||||
//! Supports historical model retrieval for backtesting scenarios.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use lru::LruCache;
|
||||
@@ -397,6 +399,7 @@ pub mod backtesting_cache {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -901,6 +901,7 @@ impl ComplianceRepository for ComplianceRepositoryImpl {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
#[allow(clippy::default_numeric_fallback)]
|
||||
#[allow(clippy::diverging_sub_expression)]
|
||||
#[allow(clippy::used_underscore_binding)]
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#![allow(clippy::missing_docs_in_private_items)]
|
||||
#![allow(clippy::clone_on_ref_ptr)]
|
||||
#![allow(clippy::str_to_string)]
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -141,6 +142,7 @@ pub enum RiskDataError {
|
||||
pub type RiskDataResult<T> = Result<T, RiskDataError>;
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1006,6 +1006,7 @@ impl LimitsRepository for LimitsRepositoryImpl {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
#[allow(clippy::default_numeric_fallback)]
|
||||
#[allow(clippy::diverging_sub_expression)]
|
||||
#[allow(clippy::used_underscore_binding)]
|
||||
|
||||
@@ -947,6 +947,7 @@ impl Portfolio {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -731,6 +731,7 @@ impl VarRepository for VarRepositoryImpl {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -532,6 +532,7 @@ impl DatabentoDownloader {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
//! - Retry logic with exponential backoff
|
||||
//! - Concurrent download limits
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used)]
|
||||
|
||||
pub mod downloader;
|
||||
pub mod error;
|
||||
pub mod service;
|
||||
|
||||
@@ -226,6 +226,7 @@ impl MinIOUploader {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::unwrap_used, clippy::expect_used)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user