Skip to content

Cleaning up resource_keys! and improving doc #1540

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

Merged
merged 5 commits into from
Jan 27, 2022

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Jan 25, 2022

See #570

sffc
sffc previously approved these changes Jan 26, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1540 (c468f85) into main (2310b3b) will decrease coverage by 0.02%.
The diff coverage is 97.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1540      +/-   ##
==========================================
- Coverage   77.03%   77.01%   -0.03%     
==========================================
  Files         310      310              
  Lines       19061    19042      -19     
==========================================
- Hits        14684    14665      -19     
  Misses       4377     4377              
Impacted Files Coverage Δ
components/calendar/src/provider.rs 21.73% <ø> (ø)
components/decimal/src/provider.rs 75.75% <ø> (ø)
components/locale_canonicalizer/src/provider.rs 8.00% <ø> (ø)
components/plurals/src/provider.rs 22.22% <ø> (ø)
components/properties/src/provider.rs 52.38% <ø> (ø)
experimental/segmenter/src/provider.rs 60.00% <ø> (ø)
provider/core/src/resource.rs 91.04% <97.72%> (-0.78%) ⬇️

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 2310b3b...c468f85. Read the comment docs.

Manishearth
Manishearth previously approved these changes Jan 26, 2022
sffc
sffc previously approved these changes Jan 27, 2022
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

The additional change seems fine. +1 on Manish's suggestion.

@robertbastian robertbastian dismissed stale reviews from sffc and Manishearth via f1916b8 January 27, 2022 16:05
@robertbastian robertbastian requested a review from sffc January 27, 2022 16:49
@@ -114,9 +114,10 @@ impl ResourceKey {
}

#[doc(hidden)]
pub const fn try_new(path: &'static str) -> Option<Self> {
// Error is a str of the expected character class and the index where it wasn't encountered
pub const fn construct_internal(path: &'static str) -> Result<Self, (&'static str, usize)> {
Copy link
Member

Choose a reason for hiding this comment

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

thought: we probably should use an enum for the error types? I guess a string is fine

Copy link
Member Author

Choose a reason for hiding this comment

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

Well this is not really public, so I don't want to add another hidden API. This should get DCE'd so we don't have the strings in the binary.

@robertbastian robertbastian merged commit 6b5f139 into unicode-org:main Jan 27, 2022
@robertbastian robertbastian deleted the keys branch January 27, 2022 19:17
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.

4 participants