chore: instead of .map().unwrap_or_else() use .map_or_else()

This commit is contained in:
CosminPerRam 2023-12-11 03:25:29 +02:00
parent 8b4f6083f1
commit febba25a91

View file

@ -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,