diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs index 6978990..5442068 100644 --- a/src/error.rs +++ b/src/error.rs @@ -23,10 +23,26 @@ impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::EOF => write!(f, "eof"), - Self::FrameTooBig { input } => write!(f, "failed to create ttyrec frame: got {} bytes of data, but ttyrec frames can be at most {} bytes", input, u32::max_value()), - Self::FrameTooLong { input } => write!(f, "failed to create ttyrec frame: got {} seconds, but ttyrecs can be at most {} seconds", input, u32::max_value()), - Self::Read { source } => write!(f, "failed to read from input: {}", source), - Self::Write { source } => write!(f, "failed to write to output: {}", source), + Self::FrameTooBig { input } => write!( + f, + "failed to create ttyrec frame: got {} bytes of data, but \ + ttyrec frames can be at most {} bytes", + input, + u32::max_value() + ), + Self::FrameTooLong { input } => write!( + f, + "failed to create ttyrec frame: got {} seconds, but ttyrecs \ + can be at most {} seconds", + input, + u32::max_value() + ), + Self::Read { source } => { + write!(f, "failed to read from input: {}", source) + } + Self::Write { source } => { + write!(f, "failed to write to output: {}", source) + } } } } |