mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Cargo clippy
This commit is contained in:
@@ -167,10 +167,7 @@ impl ScpFileTransfer {
|
||||
Err(_) => None,
|
||||
};
|
||||
// Get filesize
|
||||
let filesize: usize = match metadata.get(6).unwrap().as_str().parse::<usize>() {
|
||||
Ok(sz) => sz,
|
||||
Err(_) => 0,
|
||||
};
|
||||
let filesize: usize = metadata.get(6).unwrap().as_str().parse::<usize>().unwrap_or(0);
|
||||
// Get link and name
|
||||
let (file_name, symlink_path): (String, Option<PathBuf>) = match is_symlink {
|
||||
true => self.get_name_and_link(metadata.get(8).unwrap().as_str()),
|
||||
|
||||
Reference in New Issue
Block a user