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

DataIdentifier #5103

Merged
merged 6 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions components/calendar/src/week_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl WeekCalculator {
DataProvider::<WeekDataV1Marker>::load(
&provider.as_downcasting(),
DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
},
)
Expand All @@ -84,7 +84,7 @@ impl WeekCalculator {
DataProvider::<WeekDataV1Marker>::load(
&provider.as_deserializing(),
DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
},
)
Expand All @@ -100,7 +100,7 @@ impl WeekCalculator {
{
provider
.load(DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
})
.map(|response| WeekCalculator {
Expand Down
2 changes: 1 addition & 1 deletion components/collator/src/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl Collator {
+ ?Sized,
{
let req = DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
};

Expand Down
6 changes: 3 additions & 3 deletions components/collator/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ fn test_nb_nn_no() {
DataProvider::<CollationDataV1Marker>::load(
&icu_collator::provider::Baked,
DataRequest {
locale: &locale,
id: DataIdentifierBorrowed::for_locale(&locale),
..Default::default()
}
)
Expand All @@ -1211,7 +1211,7 @@ fn test_nb_nn_no() {
DataProvider::<CollationDataV1Marker>::load(
&icu_collator::provider::Baked,
DataRequest {
locale: &locale,
id: DataIdentifierBorrowed::for_locale(&locale),
..Default::default()
}
)
Expand All @@ -1231,7 +1231,7 @@ fn test_nb_nn_no() {
DataProvider::<CollationDataV1Marker>::load(
&icu_collator::provider::Baked,
DataRequest {
locale: &locale,
id: DataIdentifierBorrowed::for_locale(&locale),
..Default::default()
}
)
Expand Down
8 changes: 4 additions & 4 deletions components/datetime/src/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ where
{
let payload = provider
.load(DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
})?
.payload;
Expand All @@ -405,7 +405,7 @@ where
{
let payload = provider
.load(DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
})?
.payload;
Expand Down Expand Up @@ -434,7 +434,7 @@ where
+ ?Sized,
{
let req = DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
};
let payload = match kind {
Expand Down Expand Up @@ -555,7 +555,7 @@ where
+ ?Sized,
{
let req = DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
};
let payload = match kind {
Expand Down
2 changes: 1 addition & 1 deletion components/datetime/src/format/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ mod tests {

let locale = "en-u-ca-gregory".parse().unwrap();
let req = DataRequest {
locale: &locale,
id: DataIdentifierBorrowed::for_locale(&locale),
..Default::default()
};
let date_data =
Expand Down
18 changes: 9 additions & 9 deletions components/datetime/src/format/neo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
};
let payload = provider
.load_bound(DataRequest {
locale,
marker_attributes: &DataMarkerAttributes::from_tinystr(
id: DataIdentifierBorrowed::for_marker_attributes_and_locale(
marker_attrs::symbol_attr_for(
marker_attrs::Context::Format,
match field_length {
Expand All @@ -1036,6 +1035,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
_ => return Err(SingleLoadError::UnsupportedField(field)),
},
),
locale,
),
..Default::default()
})
Expand Down Expand Up @@ -1075,8 +1075,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
};
let payload = provider
.load_bound(DataRequest {
locale,
marker_attributes: &DataMarkerAttributes::from_tinystr(
id: DataIdentifierBorrowed::for_marker_attributes_and_locale(
marker_attrs::symbol_attr_for(
match field_symbol {
fields::Month::Format => marker_attrs::Context::Format,
Expand All @@ -1089,6 +1088,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
_ => return Err(SingleLoadError::UnsupportedField(field)),
},
),
locale,
),
..Default::default()
})
Expand Down Expand Up @@ -1127,8 +1127,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
let payload = R::DayPeriodNames::load_from(
provider,
DataRequest {
locale,
marker_attributes: &DataMarkerAttributes::from_tinystr(
id: DataIdentifierBorrowed::for_marker_attributes_and_locale(
marker_attrs::symbol_attr_for(
marker_attrs::Context::Format,
match field_length {
Expand All @@ -1138,6 +1137,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
_ => return Err(SingleLoadError::UnsupportedField(field)),
},
),
locale,
),
..Default::default()
},
Expand Down Expand Up @@ -1179,8 +1179,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
};
let payload = provider
.load_bound(DataRequest {
locale,
marker_attributes: &DataMarkerAttributes::from_tinystr(
id: DataIdentifierBorrowed::for_marker_attributes_and_locale(
marker_attrs::symbol_attr_for(
match field_symbol {
// UTS 35 says that "e" and "E" have the same non-numeric names
Expand All @@ -1197,6 +1196,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
_ => return Err(SingleLoadError::UnsupportedField(field)),
},
),
locale,
),
..Default::default()
})
Expand Down Expand Up @@ -1234,7 +1234,7 @@ impl<R: DateTimeNamesMarker> RawDateTimeNames<R> {
let payload = R::ZoneGenericShortNames::load_from(
provider,
DataRequest {
locale,
id: DataIdentifierBorrowed::for_locale(locale),
..Default::default()
},
)
Expand Down
Loading
Loading