Correct spelling (#4152)

This commit is contained in:
Edward Betts
2021-11-25 17:11:20 +00:00
committed by GitHub
parent e06df124ca
commit 3e93ae8af4
11 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ fn handle_dots_push(string: &mut String, count: u8) {
string.pop(); // remove last '/'
}
/// Expands any occurence of more than two dots into a sequence of ../ (or ..\ on windows), e.g.,
/// Expands any occurrence of more than two dots into a sequence of ../ (or ..\ on windows), e.g.,
/// "..." into "../..", "...." into "../../../", etc.
pub fn expand_ndots(path: impl AsRef<Path>) -> PathBuf {
// Check if path is valid UTF-8 and if not, return it as it is to avoid breaking it via string