Cargo fmt formatting
This commit is contained in:
parent
be7d75995e
commit
6fe31a8e46
@ -9,7 +9,9 @@ const SSH_ENV_VARS: [&str; 3] = ["SSH_TTY", "SSH_CONNECTION", "SSH_CLIENT"]; //
|
||||
|
||||
/// Checks if current session is an SSH session
|
||||
fn is_ssh_session() -> bool {
|
||||
SSH_ENV_VARS.iter().any(|&var_name| var_os(var_name).is_some()) // any() iterates through the iter and stops at first `true`. Equal to `||`(`or` condition)
|
||||
SSH_ENV_VARS
|
||||
.iter()
|
||||
.any(|&var_name| var_os(var_name).is_some()) // any() iterates through the iter and stops at first `true`. Equal to `||`(`or` condition)
|
||||
}
|
||||
|
||||
/// SSH shell indicator
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user