Simpler Pattern

This commit is contained in:
sholderbach 2024-07-26 10:42:44 +02:00
parent 1eb8a17315
commit f09b2dd0ab

View File

@ -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)