jychen7 commented on code in PR #3663:
URL: https://github.com/apache/arrow-rs/pull/3663#discussion_r1096903584
##########
object_store/src/path/mod.rs:
##########
@@ -210,6 +210,12 @@ impl Path {
};
// Reverse any percent encoding performed by conversion to URL
+ Self::from_url_path(path)
+ }
+
+ /// Parse a url encoded string as a [`Path`], returning a [`Error`] if
invalid,
+ /// as defined on the docstring for [`Path`]
+ pub fn from_url_path(path: &str) -> Result<Self, Error> {
Review Comment:
I was thinking to define as `impl AsRef<str>`, but
1. `as_bytes` method not found in `impl AsRef<str>`
2. `NonUnicodeSnafu { path }`: the trait `From<impl AsRef<str>>` is not
implemented for `String`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]