Skip to content

Commit

Permalink
fixup: rename field for clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Nov 7, 2023
1 parent dbc8920 commit 9c0b090
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/servers/http/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use super::requests::scrape;
/// HTTP Tracker Client
pub struct Client {
server_addr: std::net::SocketAddr,
reqwest_client: ReqwestClient,
reqwest: ReqwestClient,
key: Option<Key>,
}

Expand All @@ -25,7 +25,7 @@ impl Client {
pub fn new(server_addr: std::net::SocketAddr) -> Self {
Self {
server_addr,
reqwest_client: reqwest::Client::builder().build().unwrap(),
reqwest: reqwest::Client::builder().build().unwrap(),
key: None,
}
}
Expand All @@ -34,15 +34,15 @@ impl Client {
pub fn bind(server_addr: std::net::SocketAddr, local_address: IpAddr) -> Self {
Self {
server_addr,
reqwest_client: reqwest::Client::builder().local_address(local_address).build().unwrap(),
reqwest: reqwest::Client::builder().local_address(local_address).build().unwrap(),
key: None,
}
}

pub fn authenticated(server_addr: std::net::SocketAddr, key: Key) -> Self {
Self {
server_addr,
reqwest_client: reqwest::Client::builder().build().unwrap(),
reqwest: reqwest::Client::builder().build().unwrap(),
key: Some(key),
}
}
Expand All @@ -61,11 +61,11 @@ impl Client {
}

pub async fn get(&self, path: &str) -> Response {
self.reqwest_client.get(self.build_url(path)).send().await.unwrap()
self.reqwest.get(self.build_url(path)).send().await.unwrap()
}

pub async fn get_with_header(&self, path: &str, key: &str, value: &str) -> Response {
self.reqwest_client
self.reqwest
.get(self.build_url(path))
.header(key, value)
.send()
Expand Down

0 comments on commit 9c0b090

Please sign in to comment.