Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(api): Remove dead code #2217

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ impl fmt::Display for Method {
/// Represents an API request. This can be customized before
/// sending but only sent once.
pub struct ApiRequest {
url: String,
handle: r2d2::PooledConnection<CurlConnectionManager>,
headers: curl::easy::List,
is_authenticated: bool,
Expand All @@ -121,7 +120,6 @@ pub struct ApiRequest {
/// Represents an API response.
#[derive(Clone, Debug)]
pub struct ApiResponse {
url: String,
status: u32,
headers: Vec<String>,
body: Option<Vec<u8>>,
Expand Down Expand Up @@ -1667,7 +1665,6 @@ impl ApiRequest {
handle.url(url)?;

let request = ApiRequest {
url: url.to_owned(),
handle,
headers,
is_authenticated: false,
Expand Down Expand Up @@ -1774,12 +1771,10 @@ impl ApiRequest {
let headers = self.get_headers();
self.handle.http_headers(headers)?;
let body = self.body.as_deref();
let url = self.url.clone();
let (status, headers) =
send_req(&mut self.handle, out, body, self.progress_bar_mode.clone())?;
debug!("response status: {}", status);
Ok(ApiResponse {
url,
status,
headers,
body: None,
Expand Down
Loading