Skip to content

Commit

Permalink
Merge pull request #1841 from EliahKagan/no-esc-todo
Browse files Browse the repository at this point in the history
Remove TODOs about using `path-slash` to handle escapes
  • Loading branch information
Byron authored Feb 16, 2025
2 parents bb64ee1 + a810d1f commit ad7a94e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions gix-path/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,13 @@ pub fn to_unix_separators_on_windows<'a>(path: impl Into<Cow<'a, BStr>>) -> Cow<
/// Replace Windows path separators with slashes, which typically resembles a Unix path, unconditionally.
///
/// **Note** Do not use these and prefer the conditional versions of this method.
// TODO: use https://lib.rs/crates/path-slash to handle escapes
pub fn to_unix_separators<'a>(path: impl Into<Cow<'a, BStr>>) -> Cow<'a, BStr> {
replace(path, b'\\', b'/')
}

/// Find slashes and replace them with backslashes, unconditionally.
///
/// **Note** Do not use these and prefer the conditional versions of this method.
// TODO: use https://lib.rs/crates/path-slash to handle escapes
pub fn to_windows_separators<'a>(path: impl Into<Cow<'a, BStr>>) -> Cow<'a, BStr> {
replace(path, b'/', b'\\')
}
Expand Down

0 comments on commit ad7a94e

Please sign in to comment.