Skip to content

Commit

Permalink
Fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Timm Behner committed Jun 21, 2019
1 parent f089955 commit 7fadaef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ pub fn display(sub_matches: &ArgMatches<'_>) {

let ssh_user_host = match env::var(SSH_SESSION_ENV) {
Ok(_) => {
let username = get_username().unwrap_or("".to_string());
let hostname = get_hostname().unwrap_or("".to_string());
let username = get_username().unwrap_or_else(|_| "".to_string());
let hostname = get_hostname().unwrap_or_else(|_| "".to_string());
format!("{}@{} ", username, hostname)
},
Err(_) => "".to_string(),
Expand Down

0 comments on commit 7fadaef

Please sign in to comment.