From febba25a91b18b74b20015fc3bbc55815055193f Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 11 Dec 2023 03:25:29 +0200 Subject: [PATCH] chore: instead of .map().unwrap_or_else() use .map_or_else() --- crates/lib/src/protocols/valve/protocol.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/lib/src/protocols/valve/protocol.rs b/crates/lib/src/protocols/valve/protocol.rs index daef2e1..f655fae 100644 --- a/crates/lib/src/protocols/valve/protocol.rs +++ b/crates/lib/src/protocols/valve/protocol.rs @@ -129,8 +129,7 @@ impl ValveProtocol { 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(), |t| t.get_retries()); Ok(Self { socket,