-
Notifications
You must be signed in to change notification settings - Fork 519
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
chrono::NaiveDate.iter_days()
returnsNaiveDateDaysIterator
which is private. So, I can not store the returned iterator in the variable (or in the field of astruct
), 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.The text was updated successfully, but these errors were encountered: