mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 15:27:28 +00:00
chore: instead of .map().unwrap_or_else() use .map_or_else()
This commit is contained in:
parent
8b4f6083f1
commit
febba25a91
1 changed files with 1 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue