Skip to content

Commit 222eb4e

Browse files
committed
style: remove unused clone
1 parent e1f54cb commit 222eb4e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

htsget-http/src/error.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
use htsget_config::types::HtsGetError as HtsGetSearchError;
12
use http::StatusCode;
23
use http::header::{InvalidHeaderName, InvalidHeaderValue};
34
use serde::{Deserialize, Serialize};
45
use thiserror::Error;
56

6-
use crate::HtsGetError::InternalError;
7-
use htsget_config::types::HtsGetError as HtsGetSearchError;
8-
97
pub type Result<T> = core::result::Result<T, HtsGetError>;
108

119
/// An error type that describes the errors specified in the
@@ -105,7 +103,7 @@ impl From<InvalidHeaderValue> for HtsGetError {
105103
impl From<reqwest_middleware::Error> for HtsGetError {
106104
fn from(err: reqwest_middleware::Error) -> Self {
107105
match err {
108-
reqwest_middleware::Error::Middleware(err) => InternalError(err.to_string()),
106+
reqwest_middleware::Error::Middleware(err) => HtsGetError::InternalError(err.to_string()),
109107
reqwest_middleware::Error::Reqwest(err) => err
110108
.status()
111109
.map(|status| match status {

htsget-http/src/middleware/auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl Auth {
9393
.http_client()
9494
.map_err(|err| HtsGetError::InternalError(format!("failed to fetch data from {url}: {err}")))?
9595
.get(url)
96-
.headers(headers.clone())
96+
.headers(headers)
9797
.send()
9898
.await?;
9999
trace!("response: {:?}", response);
@@ -117,7 +117,7 @@ impl Auth {
117117
}
118118
}
119119

120-
/// Get a decoding key form the JWKS url.
120+
/// Get a decoding key from the JWKS url.
121121
pub async fn decode_jwks(&mut self, jwks_url: &Uri, token: &str) -> HtsGetResult<DecodingKey> {
122122
// Decode header and get the key id.
123123
let header = decode_header(token)?;

0 commit comments

Comments
 (0)