Simpler Pattern
This commit is contained in:
parent
1eb8a17315
commit
f09b2dd0ab
|
@ -121,7 +121,7 @@ fn expand_tilde_with_another_user_home(path: &Path) -> PathBuf {
|
|||
return match path.to_str() {
|
||||
Some(file_path) => {
|
||||
let mut file = file_path.to_string();
|
||||
match file_path.find(|c| c == '/' || c == '\\') {
|
||||
match file_path.find(['/', '\\']) {
|
||||
None => {
|
||||
file.remove(0);
|
||||
user_home_dir(&file)
|
||||
|
|
Loading…
Reference in New Issue
Block a user