mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
chore: address clippy lints
This commit is contained in:
@ -776,10 +776,7 @@ where
|
||||
}
|
||||
Poll::Pending => break,
|
||||
Poll::Ready(Some(Err(err))) => {
|
||||
return Poll::Ready(Some(Err(ProtocolError::Io(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("{err}"),
|
||||
)))));
|
||||
return Poll::Ready(Some(Err(ProtocolError::Io(io::Error::other(err)))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -795,11 +792,10 @@ where
|
||||
}
|
||||
Some(frm) => {
|
||||
let msg = match frm {
|
||||
Frame::Text(data) => {
|
||||
Message::Text(ByteString::try_from(data).map_err(|err| {
|
||||
ProtocolError::Io(io::Error::new(io::ErrorKind::Other, err))
|
||||
})?)
|
||||
}
|
||||
Frame::Text(data) => Message::Text(
|
||||
ByteString::try_from(data)
|
||||
.map_err(|err| ProtocolError::Io(io::Error::other(err)))?,
|
||||
),
|
||||
Frame::Binary(data) => Message::Binary(data),
|
||||
Frame::Ping(s) => Message::Ping(s),
|
||||
Frame::Pong(s) => Message::Pong(s),
|
||||
|
Reference in New Issue
Block a user