diff --git a/src/routes.rs b/src/routes.rs index ad8794f..2c4f1f3 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -197,8 +197,8 @@ fn validate_token( let (nonce, encrypted) = data.split_at(NONCEBYTES); - let nonce = Nonce::from_slice(&nonce).ok_or(TokenValidationError::InvalidNonce)?; - let decrypted = open_precomputed(&encrypted, &nonce, precomputed_key) + let nonce = Nonce::from_slice(nonce).ok_or(TokenValidationError::InvalidNonce)?; + let decrypted = open_precomputed(encrypted, &nonce, precomputed_key) .map_err(|_| TokenValidationError::DecryptionFailure)?; let parsed_token: Token =