Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaiveDateDaysIterator is private. #597

Closed
dnrusakov opened this issue Sep 30, 2021 · 1 comment
Closed

NaiveDateDaysIterator is private. #597

dnrusakov opened this issue Sep 30, 2021 · 1 comment

Comments

@dnrusakov
Copy link

Currently, chrono::NaiveDate.iter_days() returns NaiveDateDaysIterator which is private. So, I can not store the returned iterator in the variable (or in the field of a struct), for example: let tmp: NaiveDateDaysIterator = from.iter_days() fails to compile.

The only option I have is the boxing: let tmp: Box<dyn Iterator<Item=NaiveDate>> = Box::new(from.iter_days()) which leads to unnecessary heap allocation.

Could you guys, please, make NaiveDateDaysIterator public.

@pitdicker
Copy link
Collaborator

Fixed in #1134.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants