mirror of
https://github.com/veeso/termscp.git
synced 2026-09-26 22:11:26 -07:00
fix: stabilize core error handling
Remove production panic and unwrap paths from core modules. Propagate bookmark encryption failures, harden file watcher and temp mapped file handling, and clean up dead code in shared utilities.
This commit is contained in:
+9
-3
@@ -73,10 +73,16 @@ impl TryFrom<&Args> for RemoteArgs {
|
||||
|
||||
// set args based on hosts len
|
||||
if hosts.len() == 1 {
|
||||
remote_args.remote = hosts.pop().unwrap();
|
||||
remote_args.remote = hosts
|
||||
.pop()
|
||||
.ok_or_else(|| String::from("Missing remote host configuration"))?;
|
||||
} else if hosts.len() == 2 {
|
||||
remote_args.host_bridge = hosts.pop().unwrap();
|
||||
remote_args.remote = hosts.pop().unwrap();
|
||||
remote_args.host_bridge = hosts
|
||||
.pop()
|
||||
.ok_or_else(|| String::from("Missing host-bridge configuration"))?;
|
||||
remote_args.remote = hosts
|
||||
.pop()
|
||||
.ok_or_else(|| String::from("Missing remote host configuration"))?;
|
||||
}
|
||||
|
||||
Ok(remote_args)
|
||||
|
||||
Reference in New Issue
Block a user