From efd3b5cf0e972f4408f8c49f2804f064138ab7e9 Mon Sep 17 00:00:00 2001 From: Nguyen Duc Toan Date: Wed, 11 Oct 2023 21:27:58 +0700 Subject: [PATCH] remove space prefix and suffix in path --- shared/src/url.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/src/url.rs b/shared/src/url.rs index 10e45db3..94fd227a 100644 --- a/shared/src/url.rs +++ b/shared/src/url.rs @@ -42,15 +42,15 @@ impl From<&Path> for Url { } impl From for Url { - fn from(path: String) -> Self { Self::from(PathBuf::from(path)) } + fn from(path: String) -> Self { Self::from(PathBuf::from(path.trim())) } } impl From<&String> for Url { - fn from(path: &String) -> Self { Self::from(PathBuf::from(path)) } + fn from(path: &String) -> Self { Self::from(PathBuf::from(path.trim())) } } impl From<&str> for Url { - fn from(path: &str) -> Self { Self::from(PathBuf::from(path)) } + fn from(path: &str) -> Self { Self::from(PathBuf::from(path.trim())) } } impl AsRef for Url {