mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Replaced Result<T, GDError> with GDResult<T>
This commit is contained in:
parent
526aef9acc
commit
15e6ad5892
6 changed files with 25 additions and 25 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use crate::errors::GDError;
|
||||
use crate::valve;
|
||||
use crate::{GDResult, valve};
|
||||
use crate::valve::{ValveProtocol, App, GatheringSettings, ServerPlayer, Server};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -69,7 +68,7 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> Result<Response, GDError> {
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
||||
let valve_response = ValveProtocol::query(App::CSGO, address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use crate::errors::GDError;
|
||||
use crate::valve;
|
||||
use crate::{GDResult, valve};
|
||||
use crate::valve::{ValveProtocol, App, GatheringSettings, Server, ServerRule, ServerPlayer};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -71,7 +70,7 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> Result<Response, GDError> {
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
||||
let valve_response = ValveProtocol::query(App::TF2, address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use crate::errors::GDError;
|
||||
use crate::valve;
|
||||
use crate::{GDResult, valve};
|
||||
use crate::valve::{ValveProtocol, App, GatheringSettings, ServerPlayer, Server, ServerRule};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -83,7 +82,7 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn query(address: &str, port: Option<u16>) -> Result<Response, GDError> {
|
||||
pub fn query(address: &str, port: Option<u16>) -> GDResult<Response> {
|
||||
let valve_response = ValveProtocol::query(App::TheShip, address, match port {
|
||||
None => 27015,
|
||||
Some(port) => port
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue