diff --git a/mux/src/ssh.rs b/mux/src/ssh.rs index 2f30d6361..dac597038 100644 --- a/mux/src/ssh.rs +++ b/mux/src/ssh.rs @@ -908,24 +908,6 @@ struct PtyWriter { rx: Receiver, } -impl std::io::Write for WrappedSshPty { - fn write(&mut self, _buf: &[u8]) -> std::io::Result { - log::error!("boo"); - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "you are expected to write via try_clone_writer", - )) - } - - fn flush(&mut self) -> std::io::Result<()> { - log::error!("boo"); - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "you are expected to write via try_clone_writer", - )) - } -} - impl WrappedSshPtyInner { fn check_connected(&mut self) -> anyhow::Result<()> { match self { diff --git a/wezterm-ssh/examples/ssh.rs b/wezterm-ssh/examples/ssh.rs index fa4658463..a0b3ebe5a 100644 --- a/wezterm-ssh/examples/ssh.rs +++ b/wezterm-ssh/examples/ssh.rs @@ -147,7 +147,7 @@ fn main() { // Need to separate out the writer so that we can drop // the pty which would otherwise keep the ssh session // thread alive - let mut writer = pty.try_clone_writer()?; + let mut writer = pty.take_writer()?; std::thread::spawn(move || { let mut buf = [0u8; 8192]; let mut stdin = std::io::stdin();