mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 03:34:58 +02:00
fix: clippy warning of rust 1.8.4 (#14984)
# Description I'm on rust toolchain 1.8.4, and I can see clippy warnings that can't be caught by the ci workflow, primarily related to lifetime params. I think it doesn't hurt to fix those in advance. # User-Facing Changes # Tests + Formatting # After Submitting
This commit is contained in:
@ -126,7 +126,7 @@ fn is_termux() -> bool {
|
||||
}
|
||||
|
||||
fn expand_tilde_with_another_user_home(path: &Path) -> PathBuf {
|
||||
return match path.to_str() {
|
||||
match path.to_str() {
|
||||
Some(file_path) => {
|
||||
let mut file = file_path.to_string();
|
||||
match file_path.find(['/', '\\']) {
|
||||
@ -147,7 +147,7 @@ fn expand_tilde_with_another_user_home(path: &Path) -> PathBuf {
|
||||
}
|
||||
}
|
||||
None => path.to_path_buf(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Expand tilde ("~") into a home directory if it is the first path component
|
||||
|
Reference in New Issue
Block a user