]> nmode's Git Repositories - signal-cli/blobdiff - client/src/transports/stream_codec.rs
Fix clippy warnings
[signal-cli] / client / src / transports / stream_codec.rs
index 6f77306f689901c806a91073cc8af3b5cc746174..e46233cb93860417fba3fe69c2cbc1721c7ee850 100644 (file)
@@ -41,7 +41,7 @@ impl Decoder for StreamCodec {
 
             match str::from_utf8(line.as_ref()) {
                 Ok(s) => Ok(Some(s.to_string())),
 
             match str::from_utf8(line.as_ref()) {
                 Ok(s) => Ok(Some(s.to_string())),
-                Err(_) => Err(io::Error::new(io::ErrorKind::Other, "invalid UTF-8")),
+                Err(_) => Err(io::Error::other("invalid UTF-8")),
             }
         } else {
             Ok(None)
             }
         } else {
             Ok(None)