Collapse redundant closure

This was flagged by `cargo clippy`:

    warning: redundant closure found
This commit is contained in:
Alex Crawford 2020-12-28 23:06:48 -08:00
parent 039a55e1bf
commit bc957da1ea
1 changed files with 1 additions and 1 deletions

View File

@ -1441,7 +1441,7 @@ impl<'b, 'c, 'e> InterfaceInner<'b, 'c, 'e> {
match tcp_socket.process(timestamp, &ip_repr, &tcp_repr) {
// The packet is valid and handled by socket.
Ok(reply) => return Ok(reply.map(|x| IpPacket::Tcp(x))),
Ok(reply) => return Ok(reply.map(IpPacket::Tcp)),
// The packet is malformed, or doesn't match the socket state,
// or the socket buffer is full.
Err(e) => return Err(e)