File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
provider/cldr/src/transform/time_zones Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,18 @@ impl TryFrom<&str> for TimeZonesProvider {
68
68
impl KeyedDataProvider for TimeZonesProvider {
69
69
fn supports_key ( resc_key : & ResourceKey ) -> Result < ( ) , DataError > {
70
70
// TODO(#442): Clean up KeyedDataProvider
71
- match * resc_key {
72
- key:: TIMEZONE_FORMATS_V1 => Ok ( ( ) ) ,
73
- key:: TIMEZONE_EXEMPLAR_CITIES_V1 => Ok ( ( ) ) ,
74
- key:: TIMEZONE_GENERIC_NAMES_LONG_V1 => Ok ( ( ) ) ,
75
- key:: TIMEZONE_GENERIC_NAMES_SHORT_V1 => Ok ( ( ) ) ,
76
- key:: TIMEZONE_SPECIFIC_NAMES_LONG_V1 => Ok ( ( ) ) ,
77
- key:: TIMEZONE_SPECIFIC_NAMES_SHORT_V1 => Ok ( ( ) ) ,
78
- _ => Err ( DataErrorKind :: MissingResourceKey . with_key ( * resc_key) ) ,
71
+ // Note: This is a big if{} instead of match{} due to Rust bug #93470
72
+ if * resc_key == key:: TIMEZONE_FORMATS_V1
73
+ || * resc_key == key:: TIMEZONE_FORMATS_V1
74
+ || * resc_key == key:: TIMEZONE_EXEMPLAR_CITIES_V1
75
+ || * resc_key == key:: TIMEZONE_GENERIC_NAMES_LONG_V1
76
+ || * resc_key == key:: TIMEZONE_GENERIC_NAMES_SHORT_V1
77
+ || * resc_key == key:: TIMEZONE_SPECIFIC_NAMES_LONG_V1
78
+ || * resc_key == key:: TIMEZONE_SPECIFIC_NAMES_SHORT_V1
79
+ {
80
+ Ok ( ( ) )
81
+ } else {
82
+ Err ( DataErrorKind :: MissingResourceKey . with_key ( * resc_key) )
79
83
}
80
84
}
81
85
}
You can’t perform that action at this time.
0 commit comments