Skip to content

Commit 5df7daf

Browse files
quextentarcieri
andauthored
pkcs5: fix type annotation required error (#1625)
Co-authored-by: Tony Arcieri <[email protected]>
1 parent 4083484 commit 5df7daf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkcs5/src/pbes2/encryption.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl EncryptionKey {
178178
pub fn derive_from_password(password: &[u8], kdf: &Kdf, key_size: usize) -> Result<Self> {
179179
// if the kdf params defined a key length, ensure it matches the required key size
180180
if let Some(len) = kdf.key_length() {
181-
if key_size != len.into() {
181+
if key_size != usize::from(len) {
182182
return Err(kdf.to_alg_params_invalid());
183183
}
184184
}

0 commit comments

Comments
 (0)