-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fix maximize function #1171
Fix maximize function #1171
Conversation
b2d79e5
to
5152824
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Explaining the changes: When und_latn_AQ is being tried to maximize: Current implementation: After the changes: |
PR Bump cc: @sffc |
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.
Sorry for the delay in reviewing this!
PR check ping |
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.
code looks okay to me but I'd like @dminor to be the one to give it final approval
@dminor PR bump |
@@ -186,11 +186,23 @@ fn update_langid( | |||
entry: &LanguageIdentifier, | |||
langid: &mut LanguageIdentifier, | |||
) -> CanonicalizationResult { | |||
let language_unmodified = langid.language.clone(); | |||
let script_unmodified = langid.script.clone(); | |||
let region_unmodified = langid.region.clone(); |
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.
question
: wouldn't it be much cheaper to register changes, rather than clone and compare?
I mean:
let language_modified = false;
if (...) {
language_modified = true;
}
if language_modified {
CanonicalizationResult::Modified
} else {
CanonicalizationResult::Unmodified
}
?
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.
Done, please check the PR now
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.
Sorry about the very long delay in reviewing this. This looks fine to me, but please have a look at Zibi's comments as well.
@pandusonu2 PTAL at Zibi's question above as well as the failing Clippy lint |
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.
lgtm! Minor stylistic nits left.
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.
lgtm!
@sffc I dont have permissions to merge it. Please do merge it, after the tests are run |
Fixes #817