Skip to content

Commit

Permalink
fix(*): Fixes various clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
thomastaylor312 committed Jan 26, 2022
1 parent 3de704c commit 2bc895b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
6 changes: 1 addition & 5 deletions bin/client/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,7 @@ fn role_from_name(name: String) -> Result<SignatureRole> {

async fn first_matching_key(fpath: PathBuf, role: &SignatureRole) -> Result<SecretKeyEntry> {
let keys = SecretKeyFile::load_file(&fpath).await.map_err(|e| {
ClientError::Other(format!(
"Error loading file {}: {}",
fpath.display(),
e.to_string()
))
ClientError::Other(format!("Error loading file {}: {}", fpath.display(), e))
})?;

keys.get_first_matching(role)
Expand Down
13 changes: 5 additions & 8 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,10 @@ impl<T: tokens::TokenManager> Client<T> {
{
let parsed_id = id.try_into().map_err(|e| e.into())?;
tracing::span::Span::current().record("invoice_id", &tracing::field::display(&parsed_id));
let req = self.client.delete(self.base_url.join(&format!(
"{}/{}",
INVOICE_ENDPOINT,
parsed_id.to_string()
))?);
let req = self.client.delete(
self.base_url
.join(&format!("{}/{}", INVOICE_ENDPOINT, parsed_id))?,
);
let req = self.token_manager.apply_auth_header(req).await?;
trace!(?req);
let resp = req.send().await?;
Expand Down Expand Up @@ -461,9 +460,7 @@ impl<T: tokens::TokenManager> Client<T> {
tracing::span::Span::current().record("invoice_id", &tracing::field::display(&parsed_id));
let req = self.client.get(self.base_url.join(&format!(
"{}/{}/{}",
RELATIONSHIP_ENDPOINT,
"missing",
parsed_id.to_string()
RELATIONSHIP_ENDPOINT, "missing", parsed_id
))?);
let req = self.token_manager.apply_auth_header(req).await?;
trace!(?req);
Expand Down
4 changes: 2 additions & 2 deletions src/client/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ impl OidcToken {

println!(
"Open this URL in your browser:\n{}\nand then enter the code when prompted: {}",
device_code_details.verification_uri().to_string(),
device_code_details.user_code().secret().to_string()
**device_code_details.verification_uri(),
device_code_details.user_code().secret()
);

let oauth_client: Oauth2Client<
Expand Down

0 comments on commit 2bc895b

Please sign in to comment.