chore: address Rust 1.83.0 clippy lints and enable more clippy lints (#6705)

This commit is contained in:
Sanchith Hegde
2024-12-02 20:00:44 +05:30
committed by GitHub
parent 797a0db773
commit 9a59d0a5ff
139 changed files with 147 additions and 417 deletions

View File

@ -238,7 +238,6 @@ impl VerifySignature for HmacSha512 {
}
}
///
/// Blake3
#[derive(Debug)]
pub struct Blake3(String);
@ -437,9 +436,7 @@ pub fn generate_cryptographically_secure_random_bytes<const N: usize>() -> [u8;
bytes
}
///
/// A wrapper type to store the encrypted data for sensitive pii domain data types
///
#[derive(Debug, Clone)]
pub struct Encryptable<T: Clone> {
inner: T,
@ -447,9 +444,7 @@ pub struct Encryptable<T: Clone> {
}
impl<T: Clone, S: masking::Strategy<T>> Encryptable<Secret<T, S>> {
///
/// constructor function to be used by the encryptor and decryptor to generate the data type
///
pub fn new(
masked_data: Secret<T, S>,
encrypted_data: Secret<Vec<u8>, EncryptionStrategy>,
@ -462,33 +457,25 @@ impl<T: Clone, S: masking::Strategy<T>> Encryptable<Secret<T, S>> {
}
impl<T: Clone> Encryptable<T> {
///
/// Get the inner data while consuming self
///
#[inline]
pub fn into_inner(self) -> T {
self.inner
}
///
/// Get the reference to inner value
///
#[inline]
pub fn get_inner(&self) -> &T {
&self.inner
}
///
/// Get the inner encrypted data while consuming self
///
#[inline]
pub fn into_encrypted(self) -> Secret<Vec<u8>, EncryptionStrategy> {
self.encrypted
}
///
/// Deserialize inner value and return new Encryptable object
///
pub fn deserialize_inner_value<U, F>(
self,
f: F,