Skip to content

Commit 2fc7262

Browse files
committed
Apply Copilot suggestion
1 parent c657190 commit 2fc7262

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/tun.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
9292
});
9393

9494
let mut ipstack_config = ipstack::IpStackConfig::default();
95-
let mut tcp_config = ipstack::TcpConfig::default();
96-
tcp_config.options = Some(vec![ipstack::TcpOptions::MaximumSegmentSize(1460)]);
97-
ipstack_config.with_tcp_config(tcp_config);
9895
ipstack_config.mtu(MTU);
9996
let mut tcp_config = ipstack::TcpConfig::default();
10097
tcp_config.timeout = std::time::Duration::from_secs(args.tcp_timeout);
98+
tcp_config.options = Some(vec![ipstack::TcpOptions::MaximumSegmentSize(1460)]);
10199
ipstack_config.with_tcp_config(tcp_config);
102100
ipstack_config.udp_timeout(std::time::Duration::from_secs(args.udp_timeout));
103101

0 commit comments

Comments
 (0)