Closed vidyli closed 3 years ago
Thank you for your issue! I believe the issue is that you're eliding the lifetime, when you need to specify it as 'static
. So changing it to dyn Iterator<Item = &'static LanguageIdentifier> + '_
should work. If that doesn't work you can always use .collect
to return a Vec
, LOCALES.locales().collect()
.
I'm going to close this, as this is more of a general Rust issue than a fluent-templates
specific issue, but feel free to keep commenting if neither of the above solutions work for you.
I need to get all language identifier for the static loader in a function, how can type the return object please?