From 420e0b9c3c099574630846aa7da88f2a6a79d1fc Mon Sep 17 00:00:00 2001 From: t4ai6i Date: Tue, 15 Sep 2026 15:34:12 +0900 Subject: [PATCH] chore: update package version to 0.36.1 and refactor company handling in scoring data --- Cargo.lock | 2 +- Cargo.toml | 2 +- examples/fetch_scoring_data.rs | 2 +- examples/make_statements.rs | 2 +- src/domain/models/company/model.rs | 8 +++++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef11105..8ff0d15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1173,7 +1173,7 @@ dependencies = [ [[package]] name = "quantitative-data-analysis-rs" -version = "0.36.0" +version = "0.36.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index c86f75a..af07519 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quantitative-data-analysis-rs" -version = "0.36.0" +version = "0.36.1" edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/examples/fetch_scoring_data.rs b/examples/fetch_scoring_data.rs index 8b84659..60adbb4 100644 --- a/examples/fetch_scoring_data.rs +++ b/examples/fetch_scoring_data.rs @@ -60,7 +60,7 @@ async fn main() -> Result<()> { let mut partial_file = File::create(PARTIAL_OUTPUT_PATH)?; partial_file.write_all(b"[\n")?; - for (index, company) in target_companies.into_iter().enumerate() { + for (index, company) in target_companies.0.into_iter().enumerate() { let result = controller .fetch(company.code, previous_business_day, Utc::now()) .await?; diff --git a/examples/make_statements.rs b/examples/make_statements.rs index 690faec..e24895b 100644 --- a/examples/make_statements.rs +++ b/examples/make_statements.rs @@ -41,7 +41,7 @@ async fn main() -> anyhow::Result<()> { let mut success_count = 0usize; let mut failure_count = 0usize; - for (index, company) in companies.into_iter().enumerate() { + for (index, company) in companies.0.into_iter().enumerate() { let code = company.code; let query = get_statement::Query { code: code.as_str(), diff --git a/src/domain/models/company/model.rs b/src/domain/models/company/model.rs index d005a9d..9f88d69 100644 --- a/src/domain/models/company/model.rs +++ b/src/domain/models/company/model.rs @@ -26,11 +26,13 @@ pub struct Company { pub struct Companies(pub Vec); impl Companies { - pub fn domestic_prime_standard_growth_companies(&self) -> Vec { - self.iter() + pub fn domestic_prime_standard_growth_companies(&self) -> Self { + let companies = self + .iter() .filter(|company| is_target_company(company)) .cloned() - .collect() + .collect(); + Self(companies) } }