From 8f5e3b4e60f1b16eb0c39b451f91cb29186a4393 Mon Sep 17 00:00:00 2001 From: d2weber <29163905+d2weber@users.noreply.github.com> Date: Mon, 23 Sep 2024 08:44:24 +0200 Subject: [PATCH] Fix import error in Tests --- src/socket/tcp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socket/tcp.rs b/src/socket/tcp.rs index f884cd78d..1a2eec54c 100644 --- a/src/socket/tcp.rs +++ b/src/socket/tcp.rs @@ -3072,7 +3072,7 @@ mod test { ack_number: Some(REMOTE_SEQ + 1), max_seg_size: Some(BASE_MSS), window_scale: Some(*shift_amt), - window_len: cmp::min(*buffer_size, 65535) as u16, + window_len: u16::try_from(*buffer_size).unwrap_or(u16::MAX), ..RECV_TEMPL }] ); @@ -3750,7 +3750,7 @@ mod test { ack_number: None, max_seg_size: Some(BASE_MSS), window_scale: Some(*shift_amt), - window_len: cmp::min(*buffer_size, 65535) as u16, + window_len: u16::try_from(*buffer_size).unwrap_or(u16::MAX), sack_permitted: true, ..RECV_TEMPL }]