Hello again. I'm having trouble integrating date-time formatting with my localization crate. I've integrated relative-time formatting successfully though. I'm using the high-level icu_datetime crate. I've this data provider (docs.rs/icu_testdata):
lazy_static! {
static ref ICU_PROVIDER: icu_provider_fs::FsDataProvider = icu_testdata::get_provider();
}
I'm using it here (blob):
impl LocaleMap {
pub fn create_date_time_formatter(&self, options: &super::date_time_format::DateTimeFormatOptions) -> super::DateTimeFormatter {
// ...
let mut r = super::date_time_format::DateTimeFormatter::try_new(lid, &ICU_PROVIDER, options);
// ...
r.unwrap()
}
}
The compiler is generating:
the trait bound
ICU_PROVIDER: icu_provider::data_provider::DataProvider<'_>
is not satisfied
the traiticu_provider::data_provider::DataProvider<'_>
is not implemented forICU_PROVIDER
Consulting the documentation (docs.rs/icu_provider_fs/struct.FsDataProvider.html), I don't see what is missing. Am I accessing my static variable in the wrong way?