remove dead code
This commit is contained in:
1 parent
9745a24c63
commit
be5c255f1b
1 file changed
-18
@@ -10,7 +10,6 @@ use async_trait::async_trait;
|
||||
use filedescriptor::{socketpair, FileDescriptor};
|
||||
use portable_pty::cmdbuilder::CommandBuilder;
|
||||
use portable_pty::{ExitStatus, MasterPty, PtySize};
|
||||
use promise::{Future, Promise};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::{BTreeMap, HashMap, HashSet, VecDeque};
|
||||
use std::io::{BufWriter, Read, Write};
|
||||
@@ -76,15 +75,6 @@ impl ssh2::KeyboardInteractivePrompt for ConnectionUI {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn async_ssh_connect(remote_address: &str, username: &str) -> Future<ssh2::Session> {
|
||||
let mut promise = Promise::new();
|
||||
let future = promise.get_future().unwrap();
|
||||
let remote_address = remote_address.to_owned();
|
||||
let username = username.to_owned();
|
||||
std::thread::spawn(move || promise.result(ssh_connect(&remote_address, &username)));
|
||||
future
|
||||
}
|
||||
|
||||
pub fn ssh_connect_with_ui(
|
||||
remote_address: &str,
|
||||
username: &str,
|
||||
@@ -247,14 +237,6 @@ pub fn ssh_connect_with_ui(
|
||||
})
|
||||
}
|
||||
|
||||
pub fn ssh_connect(remote_address: &str, username: &str) -> anyhow::Result<ssh2::Session> {
|
||||
let mut ui = ConnectionUI::new();
|
||||
ui.title("🔐 wezterm: SSH authentication");
|
||||
let sess = ssh_connect_with_ui(remote_address, username, &mut ui)?;
|
||||
ui.close();
|
||||
Ok(sess)
|
||||
}
|
||||
|
||||
/// Represents a connection to remote host via ssh.
|
||||
/// The domain is created with the ssh config prior to making the
|
||||
/// connection. The connection is established by the first spawn()
|
||||
|
||||
Reference in new issue
Block a user