Skip to content

Commit

Permalink
Linters
Browse files Browse the repository at this point in the history
  • Loading branch information
MaeIsBad committed Jul 8, 2024
1 parent 8d77d53 commit 27bbb33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/auth0/cache/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ where
for<'de> T: Deserialize<'de>,
{
let dec = XChaCha20Poly1305::new_from_slice(token_encryption_key_str.as_bytes()).unwrap();
let ciphertext = encrypted.get(..encrypted.len()-NONCE_SIZE);
let nonce = encrypted.get(encrypted.len()-NONCE_SIZE..);

let ciphertext = encrypted.get(..encrypted.len() - NONCE_SIZE);
let nonce = encrypted.get(encrypted.len() - NONCE_SIZE..);

let (Some(ciphertext), Some(nonce)) = (ciphertext, nonce) else {
return Err(Auth0Error::CryptoError(chacha20poly1305::Error));
Expand Down
2 changes: 1 addition & 1 deletion src/auth0/cache/redis_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Cache for RedisCache {
let mut connection = self.client.get_async_connection().await?;
let encrypted_value: Vec<u8> = crypto::encrypt(value_ref, self.encryption_key.as_str())?;
let expiration: usize = value_ref.lifetime_in_seconds();
connection.set_ex(key, encrypted_value, expiration).await?;
let _: () = connection.set_ex(key, encrypted_value, expiration).await?;
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/request/request_type/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl<'a, Client: BridgeClient> GraphQLRequest<'a, Client> {
) -> PrimaBridgeResult<Self> {
// No content-type here because Form set it at `multipart/form-data` with extra params for
// disposition
let json_body = serde_json::to_value(&graphql_body.into())?;
let json_body = serde_json::to_value(graphql_body.into())?;
let body_with_injected_variables = match &multipart {
GraphQLMultipart::Single(single) => {
let path: VecDeque<&str> = single.path.split('.').collect();
Expand Down

0 comments on commit 27bbb33

Please sign in to comment.