From 177d22e4b266f14463cbfb8e65e016e1e7d39459 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 11 Dec 2023 03:26:55 +0200 Subject: [PATCH] chore: instead of .map().unwrap_or_else() use .map_or_else() --- crates/lib/src/protocols/unreal2/protocol.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/lib/src/protocols/unreal2/protocol.rs b/crates/lib/src/protocols/unreal2/protocol.rs index e5535ca..9b6e70c 100644 --- a/crates/lib/src/protocols/unreal2/protocol.rs +++ b/crates/lib/src/protocols/unreal2/protocol.rs @@ -35,8 +35,7 @@ impl Unreal2Protocol { let socket = UdpSocket::new(address, &timeout_settings)?; let retry_count = timeout_settings .as_ref() - .map(|t| t.get_retries()) - .unwrap_or_else(|| TimeoutSettings::default().get_retries()); + .map_or_else(|| TimeoutSettings::default().get_retries(), TimeoutSettings::get_retries); Ok(Self { socket,