From 22f4f313f1cbdaadafcc3dd471f5a0bb4f7034e1 Mon Sep 17 00:00:00 2001 From: nkitsaini Date: Mon, 21 Aug 2023 00:41:32 +0530 Subject: Remove unnecessary `Err` from `get_canonicalized_path` (#8009) Co-authored-by: Michael Davis --- helix-core/src/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-core') diff --git a/helix-core/src/path.rs b/helix-core/src/path.rs index 85c60255..ede37e04 100644 --- a/helix-core/src/path.rs +++ b/helix-core/src/path.rs @@ -85,7 +85,7 @@ pub fn get_normalized_path(path: &Path) -> PathBuf { /// /// This function is used instead of `std::fs::canonicalize` because we don't want to verify /// here if the path exists, just normalize it's components. -pub fn get_canonicalized_path(path: &Path) -> std::io::Result { +pub fn get_canonicalized_path(path: &Path) -> PathBuf { let path = expand_tilde(path); let path = if path.is_relative() { helix_loader::current_working_dir().join(path) @@ -93,7 +93,7 @@ pub fn get_canonicalized_path(path: &Path) -> std::io::Result { path }; - Ok(get_normalized_path(path.as_path())) + get_normalized_path(path.as_path()) } pub fn get_relative_path(path: &Path) -> PathBuf { -- cgit v1.2.3-70-g09d2