Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/fetch_scoring_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down
2 changes: 1 addition & 1 deletion examples/make_statements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
8 changes: 5 additions & 3 deletions src/domain/models/company/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ pub struct Company {
pub struct Companies(pub Vec<Company>);

impl Companies {
pub fn domestic_prime_standard_growth_companies(&self) -> Vec<Company> {
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)
}
}

Expand Down
Loading