From 4bd939fdf7716bebfe7d13e587f5f6e3ea77e4b4 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 27 Oct 2019 11:03:09 -0400 Subject: remove no longer used error variants --- src/error.rs | 74 ------------------------------------------------------------ 1 file changed, 74 deletions(-) diff --git a/src/error.rs b/src/error.rs index 5fa2f4d..087bc72 100644 --- a/src/error.rs +++ b/src/error.rs @@ -95,15 +95,6 @@ pub enum Error { #[snafu(display("failed to write to stdout: {}", source))] FlushTerminal { source: tokio::io::Error }, - #[snafu(display("failed to write to stdout: {}", source))] - FlushTerminalSync { source: std::io::Error }, - - #[snafu(display("failed to create ttyrec frame: got {} bytes of data, but ttyrec frames can be at most {} bytes", input, u32::max_value()))] - FrameTooBig { input: usize }, - - #[snafu(display("failed to create ttyrec frame: got {} seconds, but ttyrecs can be at most {} seconds", input, u32::max_value()))] - FrameTooLong { input: u64 }, - #[snafu(display( "failed to get recurse center profile data: {}", source @@ -176,9 +167,6 @@ pub enum Error { #[snafu(display("failed to open link in browser: {}", source))] OpenLink { source: std::io::Error }, - #[snafu(display("failed to open a pty: {}", source))] - OpenPty { source: std::io::Error }, - #[snafu(display("failed to parse address"))] ParseAddress, @@ -254,15 +242,6 @@ pub enum Error { source: std::string::FromUtf8Error, }, - #[snafu(display("failed to parse url {}: {}", url, source))] - ParseUrl { - url: String, - source: url::ParseError, - }, - - #[snafu(display("failed to poll for process exit: {}", source))] - ProcessExitPoll { source: std::io::Error }, - #[snafu(display("rate limit exceeded"))] RateLimited, @@ -271,11 +250,6 @@ pub enum Error { source: tokio::sync::mpsc::error::UnboundedRecvError, }, - #[snafu(display("failed to read from channel: {}", source))] - ReadChannelBounded { - source: tokio::sync::mpsc::error::RecvError, - }, - #[snafu(display("failed to read from file: {}", source))] ReadFile { source: tokio::io::Error }, @@ -288,15 +262,9 @@ pub enum Error { source: Box>, }, - #[snafu(display("failed to read packet: {}", source))] - ReadPacketSync { source: std::io::Error }, - #[snafu(display("failed to read packet: {}", source))] ReadPacket { source: tokio::io::Error }, - #[snafu(display("failed to read from pty: {}", source))] - ReadPty { source: std::io::Error }, - #[snafu(display("failed to read from socket: {}", source))] ReadSocket { source: tokio::io::Error }, @@ -306,9 +274,6 @@ pub enum Error { #[snafu(display("failed to read ttyrec: {}", source))] ReadTtyrec { source: ttyrec::Error }, - #[snafu(display("failed to resize pty: {}", source))] - ResizePty { source: std::io::Error }, - #[snafu(display( "failed to resolve address {}:{}: {}", host, @@ -321,28 +286,6 @@ pub enum Error { source: std::io::Error, }, - #[snafu(display( - "failed to send oauth result back to main thread: {}", - source - ))] - SendResultChannel { - source: tokio::sync::mpsc::error::SendError, - }, - - #[snafu(display( - "failed to send accepted socket to server thread: {}", - source - ))] - SendSocketChannel { - source: tokio::sync::mpsc::error::TrySendError, - }, - - #[snafu(display("failed to send accepted socket to server thread"))] - SendSocketChannelTls { - // XXX tokio_tls::Accept doesn't implement Debug or Display - // source: tokio::sync::mpsc::error::TrySendError>, - }, - #[snafu(display("received error from server: {}", message))] Server { message: String }, @@ -365,9 +308,6 @@ pub enum Error { source: tokio::sync::mpsc::error::RecvError, }, - #[snafu(display("failed to spawn process for `{}`: {}", cmd, source))] - SpawnProcess { cmd: String, source: std::io::Error }, - #[snafu(display("poll subprocess failed: {}", source))] Subprocess { source: tokio_pty_process_stream::Error, @@ -430,11 +370,6 @@ pub enum Error { #[snafu(display("failed to find user with username {}", name))] UnknownUser { name: String }, - #[snafu(display("failed to write to event channel: {}", source))] - WriteChannel { - source: tokio::sync::mpsc::error::UnboundedSendError, - }, - #[snafu(display("failed to write to file: {}", source))] WriteFile { source: tokio::io::Error }, @@ -447,15 +382,9 @@ pub enum Error { source: Box>, }, - #[snafu(display("failed to write packet: {}", source))] - WritePacketSync { source: std::io::Error }, - #[snafu(display("failed to write packet: {}", source))] WritePacket { source: tokio::io::Error }, - #[snafu(display("failed to write to pty: {}", source))] - WritePty { source: std::io::Error }, - #[snafu(display("failed to write to socket: {}", source))] WriteSocket { source: tokio::io::Error }, @@ -465,9 +394,6 @@ pub enum Error { #[snafu(display("failed to write to terminal: {}", source))] WriteTerminalCrossterm { source: crossterm::ErrorKind }, - #[snafu(display("failed to write to terminal: {}", source))] - WriteTerminalSync { source: std::io::Error }, - #[snafu(display("failed to write ttyrec: {}", source))] WriteTtyrec { source: ttyrec::Error }, } -- cgit v1.2.3-54-g00ecf