-
Notifications
You must be signed in to change notification settings - Fork 213
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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.
The additional change seems fine. +1 on Manish's suggestion.
@@ -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)> { |
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.
thought: we probably should use an enum for the error types? I guess a string is fine
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.
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.
See #570