Don't use matches! macro, for Rust 1.36 support

This commit is contained in:
Dario Nieuwenhuis 2020-12-26 03:12:48 +01:00
parent 67e03b34b6
commit a7d3f604a3
1 changed files with 5 additions and 1 deletions

View File

@ -1408,7 +1408,11 @@ impl<'a> TcpSocket<'a> {
< self.local_seq_no + core::cmp::min(self.remote_win_len, self.tx_buffer.len());
// Do we have to send a FIN?
let want_fin = matches!(self.state, State::FinWait1 | State::LastAck);
let want_fin = match self.state {
State::FinWait1 => true,
State::LastAck => true,
_ => false,
};
// Can we actually send the FIN? We can send it if:
// 1. We have unsent data that fits in the remote window.