From 996c48c248f423ae7a9af9b84175373af692fba7 Mon Sep 17 00:00:00 2001 From: Robert Pack <42610831+roeap@users.noreply.github.com> Date: Thu, 12 May 2022 21:31:09 +0200 Subject: [PATCH] default to root for empty path in azure store (#603) * default to root for empty path in azure store * clippy --- rust/src/storage/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rust/src/storage/mod.rs b/rust/src/storage/mod.rs index e2a5788b3b..2eb224fb6d 100644 --- a/rust/src/storage/mod.rs +++ b/rust/src/storage/mod.rs @@ -251,12 +251,7 @@ pub fn parse_uri<'a>(path: &'a str) -> Result, UriError> { return Err(UriError::MissingObjectFileSystem); } }; - let path = match path_parts.next() { - Some(x) => x, - None => { - return Err(UriError::MissingObjectPath); - } - }; + let path = path_parts.next().unwrap_or("/"); Ok(Uri::AdlsGen2Object(azure::AdlsGen2Object { account_name, file_system, path })) } else {