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

Replace DataPayload Deref with .get() throughout ICU4X #739

Merged
merged 2 commits into from
May 28, 2021

Conversation

sffc
Copy link
Member

@sffc sffc commented May 27, 2021

See #667

@sffc sffc requested a review from Manishearth May 27, 2021 22:55
@sffc sffc requested review from echeran, zbraniecki and a team as code owners May 27, 2021 22:55
@sffc sffc removed request for a team, zbraniecki and echeran May 27, 2021 22:55
zbraniecki
zbraniecki previously approved these changes May 27, 2021
Copy link
Member

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code is sane and looks good.

suggestion, non blocking: I strongly believe borrow is a better name here than get.

Manishearth
Manishearth previously approved these changes May 27, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #739 (72c85fa) into main (91e2fd6) will increase coverage by 0.04%.
The diff coverage is 97.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #739      +/-   ##
==========================================
+ Coverage   74.57%   74.62%   +0.04%     
==========================================
  Files         178      178              
  Lines       10719    10715       -4     
==========================================
+ Hits         7994     7996       +2     
+ Misses       2725     2719       -6     
Impacted Files Coverage Δ
components/datetime/src/time_zone.rs 100.00% <ø> (ø)
...s/locale_canonicalizer/src/locale_canonicalizer.rs 0.00% <ø> (ø)
provider/cldr/src/download/cldr_allinone.rs 38.88% <ø> (ø)
provider/core/src/export.rs 0.00% <0.00%> (ø)
provider/core/src/hello_world.rs 77.55% <ø> (ø)
provider/core/src/inv.rs 0.00% <ø> (ø)
provider/core/src/struct_provider.rs 100.00% <ø> (ø)
components/datetime/src/format/datetime.rs 50.00% <100.00%> (ø)
components/datetime/src/skeleton.rs 81.56% <100.00%> (ø)
components/decimal/src/lib.rs 94.44% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91e2fd6...72c85fa. Read the comment docs.

@coveralls
Copy link

coveralls commented May 27, 2021

Pull Request Test Coverage Report for Build 7baff248eab647aa9c4204bcc56d01a6780c8adc-PR-739

  • 41 of 42 (97.62%) changed or added relevant lines in 12 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.05%) to 74.717%

Changes Missing Coverage Covered Lines Changed/Added Lines %
provider/core/src/export.rs 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
provider/core/src/export.rs 1 0%
Totals Coverage Status
Change from base Build 65863887250dc86947386299ad64210f478a36b7: 0.05%
Covered Lines: 8124
Relevant Lines: 10873

💛 - Coveralls

@sffc
Copy link
Member Author

sffc commented May 28, 2021

the code is sane and looks good.

suggestion, non blocking: I strongly believe borrow is a better name here than get.

There are some things I like about borrow, and I considered it, but I used get because:

  1. It's shorter
  2. It's what Yoke uses
  3. .borrow() is the name of the function in the std::borrow::Borrow trait, which we are not implementing

@sffc sffc dismissed stale reviews from Manishearth and zbraniecki via da373df May 28, 2021 01:07
@sffc
Copy link
Member Author

sffc commented May 28, 2021

I'm going to use admin privileges to merge this since I got two LGTMs and my latest push only changes a README file; you can find the diff here:

da373df

@sffc sffc merged commit 958ee68 into unicode-org:main May 28, 2021
@sffc sffc deleted the no-more-deref branch May 28, 2021 01:08
@sffc
Copy link
Member Author

sffc commented May 28, 2021

Follow-up for the naming discussion: #740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants