Apply clippy fixes

This commit is contained in:
B. Blechschmidt 2023-04-04 00:19:41 +02:00
parent 10a674d1c9
commit 7818829760
2 changed files with 8 additions and 8 deletions

View file

@ -164,14 +164,14 @@ impl TcpProxy for HttpConnection {
fn have_data(&mut self, dir: Direction) -> bool {
match dir {
Direction::Incoming(incoming) => match incoming {
IncomingDirection::FromServer => self.server_inbuf.len() > 0,
IncomingDirection::FromServer => !self.server_inbuf.is_empty(),
IncomingDirection::FromClient => {
self.client_inbuf.len() > 0 || self.data_buf.len() > 0
!self.client_inbuf.is_empty() || !self.data_buf.is_empty()
}
},
Direction::Outgoing(outgoing) => match outgoing {
OutgoingDirection::ToServer => self.server_outbuf.len() > 0,
OutgoingDirection::ToClient => self.client_outbuf.len() > 0,
OutgoingDirection::ToServer => !self.server_outbuf.is_empty(),
OutgoingDirection::ToClient => !self.client_outbuf.is_empty(),
},
}
}