-
Notifications
You must be signed in to change notification settings - Fork 183
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
DataIdentifier #5103
Conversation
0524e50
to
81f0af9
Compare
* Remove `icu_provider::datagen::DataConverter`, it's unused and has been for a while * Move `icu_provider::datagen::Iterable[Dynamic]DataProvider` to the top-level (with the other provider traits), behind the `std` feature * With #5103 we can make it return `BTreeMap`, so it won't need `std` * This removes the `datagen` feature from `icu_provider_adapters` * Rename `datagen` feature to `export`, as `icu_provider_{baked,blob,fs}` call it `export`, and it doesn't do datagen
@@ -466,14 +466,18 @@ where | |||
+ DataProvider<XidStartV1Marker>, | |||
NP: ?Sized, | |||
{ | |||
fn iter_requests(&self) -> Result<HashSet<(DataLocale, DataMarkerAttributes)>, DataError> { | |||
fn iter_ids(&self) -> Result<HashSet<DataIdentifierCow>, DataError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think we should use _identifiers
instead of _ids
|
||
impl<'a> DataIdentifierBorrowed<'a> { | ||
/// TODO | ||
pub fn for_locale(locale: &'a DataLocale) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: The function here is named for_locale
but down below it is from_locale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from_
is for an owned conversion, for_
is for references
&& !(morphed_id.locale.is_empty() | ||
&& morphed_id.marker_attributes.is_empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: can you write this as !morphed_id.is_empty()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really want to define too much logic on DataIdentifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to prevent bitrot but there are still open non-blocking comments
The new union of
DataLocale
andDataMarkerAttributes
. Unlike the previousDataLocale
with auxiliary keys, there's an owned and a borrowed version.