mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-04 20:30:33 +00:00
Apply clippy fixes
This commit is contained in:
parent
10a674d1c9
commit
7818829760
2 changed files with 8 additions and 8 deletions
|
@ -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(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue