mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Games] Use port.unwrap_or instead of matching it
This commit is contained in:
parent
5f06f58df8
commit
59994bc086
44 changed files with 45 additions and 180 deletions
|
|
@ -3,8 +3,5 @@ use crate::protocols::gamespy;
|
|||
use crate::protocols::gamespy::Response;
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
||||
gamespy::one::query(address, match port {
|
||||
None => 23000,
|
||||
Some(port) => port
|
||||
}, None)
|
||||
gamespy::one::query(address, port.unwrap_or(23000), None)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue