Fix unused variable/field warnings in data_acquisition_service
Changes: - service.rs:198: Prefix unused `end_idx` with underscore - service.rs:26: Prefix unused `uploader` and `validator` fields with underscore - downloader.rs:44: Prefix unused `config` field with underscore - validator.rs:62: Prefix unused `config` field with underscore Result: 0 warnings in data_acquisition_service Verified: cargo check -p data_acquisition_service passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -41,13 +41,13 @@ pub struct DownloadJob {
|
||||
|
||||
/// Databento API downloader
|
||||
pub struct DatabentoDownloader {
|
||||
config: DatabentoDownloaderConfig,
|
||||
_config: DatabentoDownloaderConfig,
|
||||
}
|
||||
|
||||
impl DatabentoDownloader {
|
||||
/// Create new downloader
|
||||
pub fn new(config: DatabentoDownloaderConfig) -> Self {
|
||||
Self { config }
|
||||
Self { _config: config }
|
||||
}
|
||||
|
||||
/// Download data for a job
|
||||
|
||||
@@ -23,8 +23,8 @@ type JobStore = Arc<RwLock<std::collections::HashMap<String, DownloadJobDetails>
|
||||
/// Data Acquisition Service implementation
|
||||
pub struct DataAcquisitionServiceImpl {
|
||||
downloader: Arc<DatabentoDownloader>,
|
||||
uploader: Arc<MinIOUploader>,
|
||||
validator: Arc<DataValidator>,
|
||||
_uploader: Arc<MinIOUploader>,
|
||||
_validator: Arc<DataValidator>,
|
||||
job_store: JobStore,
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ impl DataAcquisitionServiceImpl {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
downloader: Arc::new(DatabentoDownloader::new(DatabentoDownloaderConfig::default())),
|
||||
uploader: Arc::new(MinIOUploader::new(MinIOUploaderConfig::default())),
|
||||
validator: Arc::new(DataValidator::new(ValidationConfig::default())),
|
||||
_uploader: Arc::new(MinIOUploader::new(MinIOUploaderConfig::default())),
|
||||
_validator: Arc::new(DataValidator::new(ValidationConfig::default())),
|
||||
job_store: Arc::new(RwLock::new(std::collections::HashMap::new())),
|
||||
}
|
||||
}
|
||||
@@ -47,8 +47,8 @@ impl DataAcquisitionServiceImpl {
|
||||
) -> Self {
|
||||
Self {
|
||||
downloader: Arc::new(DatabentoDownloader::new(downloader_config)),
|
||||
uploader: Arc::new(MinIOUploader::new(uploader_config)),
|
||||
validator: Arc::new(DataValidator::new(validator_config)),
|
||||
_uploader: Arc::new(MinIOUploader::new(uploader_config)),
|
||||
_validator: Arc::new(DataValidator::new(validator_config)),
|
||||
job_store: Arc::new(RwLock::new(std::collections::HashMap::new())),
|
||||
}
|
||||
}
|
||||
@@ -195,7 +195,7 @@ impl DataAcquisitionService for DataAcquisitionServiceImpl {
|
||||
let page = req.page.max(1) as usize;
|
||||
let page_size = req.page_size.max(1).min(100) as usize;
|
||||
let start_idx = (page - 1) * page_size;
|
||||
let end_idx = start_idx + page_size;
|
||||
let _end_idx = start_idx + page_size;
|
||||
|
||||
let total_count = jobs.len() as u32;
|
||||
let paginated_jobs = jobs.into_iter().skip(start_idx).take(page_size);
|
||||
|
||||
@@ -59,13 +59,13 @@ pub enum IssueSeverity {
|
||||
|
||||
/// Data validator
|
||||
pub struct DataValidator {
|
||||
config: ValidationConfig,
|
||||
_config: ValidationConfig,
|
||||
}
|
||||
|
||||
impl DataValidator {
|
||||
/// Create new validator
|
||||
pub fn new(config: ValidationConfig) -> Self {
|
||||
Self { config }
|
||||
Self { _config: config }
|
||||
}
|
||||
|
||||
/// Validate a downloaded file
|
||||
|
||||
Reference in New Issue
Block a user