Skip to content

Commit

Permalink
second rustfmt run
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaczanowski committed Nov 27, 2024
1 parent ca20997 commit 1930ef0
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/keyring/providers/hashicorp/vault_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,7 @@ impl VaultClient {

self.check_response_status_code(&response);

let data = if let Some(data) = response
.into_json::<Root<PublicKeyResponse>>()?
.data
{
let data = if let Some(data) = response.into_json::<Root<PublicKeyResponse>>()?.data {
data
} else {
return Err(Error::InvalidPubKey(
Expand Down Expand Up @@ -335,12 +332,10 @@ impl VaultClient {
self.check_response_status_code(&response);
Ok(())
}
Err(e) => {
Err(Error::Combined(
"Is \"access_token\" value correct?".into(),
Box::new(e.into()),
))
}
Err(e) => Err(Error::Combined(
"Is \"access_token\" value correct?".into(),
Box::new(e.into()),
)),
}
}

Expand Down Expand Up @@ -374,10 +369,7 @@ impl VaultClient {

self.check_response_status_code(&response);

let data = if let Some(data) = response
.into_json::<Root<SignResponse>>()?
.data
{
let data = if let Some(data) = response.into_json::<Root<SignResponse>>()?.data {
data
} else {
return Err(Error::NoSignature);
Expand Down Expand Up @@ -431,10 +423,7 @@ impl VaultClient {

self.check_response_status_code(&response);

let data = if let Some(data) = response
.into_json::<Root<PublicKeyResponse>>()?
.data
{
let data = if let Some(data) = response.into_json::<Root<PublicKeyResponse>>()?.data {
data
} else {
return Err(Error::InvalidPubKey("Error getting wrapping key!".into()));
Expand Down

0 comments on commit 1930ef0

Please sign in to comment.