1
0
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:
Rob Ede
2025-05-09 20:21:02 +01:00
parent ad73cdc823
commit 7eea3d3657
10 changed files with 21 additions and 32 deletions

View File

@ -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),