Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-stdx/src/path.rs')
| -rw-r--r-- | helix-stdx/src/path.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-stdx/src/path.rs b/helix-stdx/src/path.rs index 740f7bcb..e2ef9a58 100644 --- a/helix-stdx/src/path.rs +++ b/helix-stdx/src/path.rs @@ -1,5 +1,3 @@ -//! Functions for working with [Path]. - pub use etcetera::home_dir; use once_cell::sync::Lazy; use regex_cursor::{engines::meta::Regex, Input}; @@ -142,7 +140,6 @@ pub fn canonicalize(path: impl AsRef<Path>) -> PathBuf { normalize(path) } -/// Convert path into a relative path pub fn get_relative_path<'a, P>(path: P) -> Cow<'a, Path> where P: Into<Cow<'a, Path>>, @@ -272,7 +269,7 @@ pub fn get_path_suffix(src: RopeSlice<'_>, match_single_file: bool) -> Option<Ro regex .find(Input::new(src)) - .map(|mat| src.byte_slice(mat.range())) + .map(|mat| src.slice(mat.range())) } /// Returns an iterator of the **byte** ranges in src that contain a path. |