mirror of
https://github.com/veeso/termscp.git
synced 2026-04-15 14:41:34 -07:00
lint
This commit is contained in:
@@ -208,7 +208,7 @@ impl FileTransferActivity {
|
||||
Ok(h) => {
|
||||
let hostname: String = h.as_os_str().to_string_lossy().to_string();
|
||||
let tokens: Vec<&str> = hostname.split('.').collect();
|
||||
String::from(*tokens.get(0).unwrap_or(&"localhost"))
|
||||
String::from(*tokens.first().unwrap_or(&"localhost"))
|
||||
}
|
||||
Err(_) => String::from("localhost"),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user