Skip to content

Commit 65ba95e

Browse files
committed
fix: use from instead of parse
1 parent 92ef8be commit 65ba95e

File tree

1 file changed

+1
-1
lines changed
  • datafusion/core/src/datasource/listing

1 file changed

+1
-1
lines changed

datafusion/core/src/datasource/listing/url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl ListingTableUrl {
110110
/// Creates a new [`ListingTableUrl`] from a url and optional glob expression
111111
fn new(url: Url, glob: Option<Pattern>) -> Self {
112112
let decoded_path = percent_encoding::percent_decode_str(url.path()).decode_utf8_lossy();
113-
let prefix = Path::parse(decoded_path).expect("should be URL safe");
113+
let prefix = Path::from(decoded_path.as_ref());
114114
Self { url, prefix, glob }
115115
}
116116

0 commit comments

Comments
 (0)