aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authornkitsaini2023-08-20 19:11:32 +0000
committerGitHub2023-08-20 19:11:32 +0000
commit22f4f313f1cbdaadafcc3dd471f5a0bb4f7034e1 (patch)
tree39f263a35821bc6b90874a1d740499b3bc376646 /helix-core/src
parent2767459f89382f2b664c2a9f5ff287f3c48a896d (diff)
Remove unnecessary `Err` from `get_canonicalized_path` (#8009)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/path.rs4
1 files changed, 2 insertions, 2 deletions
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<PathBuf> {
+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<PathBuf> {
path
};
- Ok(get_normalized_path(path.as_path()))
+ get_normalized_path(path.as_path())
}
pub fn get_relative_path(path: &Path) -> PathBuf {