diff --git a/crates/lib/src/games/eco/types.rs b/crates/lib/src/games/eco/types.rs index 4a962ec..7429b10 100644 --- a/crates/lib/src/games/eco/types.rs +++ b/crates/lib/src/games/eco/types.rs @@ -224,7 +224,7 @@ pub struct EcoRequestSettings { impl From for EcoRequestSettings { fn from(value: ExtraRequestSettings) -> Self { - EcoRequestSettings { + Self { hostname: value.hostname, } } @@ -232,7 +232,7 @@ impl From for EcoRequestSettings { impl From for HttpSettings { fn from(value: EcoRequestSettings) -> Self { - HttpSettings { + Self { protocol: HttpProtocol::Http, hostname: value.hostname, headers: Vec::with_capacity(0), diff --git a/crates/lib/src/http.rs b/crates/lib/src/http.rs index d3ac842..e0670ad 100644 --- a/crates/lib/src/http.rs +++ b/crates/lib/src/http.rs @@ -194,7 +194,7 @@ impl HttpClient { url: U, timeout_settings: &Option, headers: Option>, - ) -> GDResult + ) -> GDResult where U::Error: std::error::Error + Send + Sync + 'static, { @@ -229,7 +229,7 @@ impl HttpClient { headers: headers.unwrap_or_default(), }; - HttpClient::new(&address, timeout_settings, http_settings) + Self::new(&address, timeout_settings, http_settings) } /// Send a HTTP GET request and return the response data as a buffer.