-
Notifications
You must be signed in to change notification settings - Fork 689
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
Make ObjectStoreScheme public #5912
Conversation
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.
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 just wished for this, so thanks! I'm not a maintainer but hopefully this is a helpful review.
@@ -62,7 +62,7 @@ impl ObjectStoreScheme { | |||
/// Create an [`ObjectStoreScheme`] from the provided [`Url`] | |||
/// | |||
/// Returns the [`ObjectStoreScheme`] and the remaining [`Path`] | |||
fn parse(url: &Url) -> Result<(Self, Path), Error> { | |||
pub fn parse(url: &Url) -> Result<(Self, Path), Error> { |
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.
You want to change this to return super::Error
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.
fixed in b9ca112 (by making error public not by returning super::Error)
@@ -43,7 +43,7 @@ impl From<Error> for super::Error { | |||
|
|||
/// Recognises various URL formats, identifying the relevant [`ObjectStore`] | |||
#[derive(Debug, Eq, PartialEq)] | |||
enum ObjectStoreScheme { | |||
pub enum ObjectStoreScheme { |
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.
Maybe slap a #[non_exhaustive]
on this, so that new variants can be added after a potential 1.0 release
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 in b9ca112
It appears this PR also has a clippy CI failure that we need to fix before merging |
Hey, I will fix these issues up next week. Thanks for the review 😌 |
Would it be possible to add edit: also not a maintainer |
I took the liberty of adding additional docs / examples to this PR and merging up from main |
I'll plan to merge this in the next few days unless there are any other comments |
Thank you for merging this, and thank you for fixing it up for me! Sorry I didn’t manage to find the time. |
Which issue does this PR close?
Closes #5911.
Rationale for this change
ObjectStoreScheme::parse
contains non-trivial logic to resolve a given url into an object store scheme. Exposing this is useful, as it allows consumers to set up their own builders as they would like.What changes are included in this PR?
This just makes the types public.
Are there any user-facing changes?
The types become public.