Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
second rustfmt run
Browse files Browse the repository at this point in the history
mkaczanowski committed Nov 27, 2024

Unverified

This user has not yet uploaded their public signing key.
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
@@ -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(
@@ -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()),
)),
}
}

@@ -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);
@@ -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()));

0 comments on commit 1930ef0

Please sign in to comment.