Replaced Result<T, GDError> with GDResult<T>

This commit is contained in:
CosminPerRam 2022-10-20 23:19:57 +03:00
parent 526aef9acc
commit 15e6ad5892
6 changed files with 25 additions and 25 deletions

View file

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

View file

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

View file

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