diff options
Diffstat (limited to 'src/i3bar_protocol.rs')
| -rw-r--r-- | src/i3bar_protocol.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/i3bar_protocol.rs b/src/i3bar_protocol.rs index 8aee9af..d0a371a 100644 --- a/src/i3bar_protocol.rs +++ b/src/i3bar_protocol.rs @@ -100,10 +100,10 @@ impl Protocol { *self = Self::JsonNotStarted { header }; self.process_new_bytes(rem) } - Ok((Some(header), _)) => Err(Error::new( - ErrorKind::Other, - format!("Protocol version {} is not supported", header.version), - )), + Ok((Some(header), _)) => Err(Error::other(format!( + "Protocol version {} is not supported", + header.version + ))), _ => { *self = Self::PlainText { pending_line: None }; self.process_new_bytes(bytes) |
