Skip to content

Commit 283c1bb

Browse files
committed
Fix trivial numeric cast lint
Signed-off-by: Lars Persson <larper@axis.com>
1 parent 3df67b4 commit 283c1bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cryptoki/src/session/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,14 @@ pub enum UserType {
9595
}
9696

9797
impl From<UserType> for CK_USER_TYPE {
98+
// Mask lint for n.into() on 32-bit systems.
99+
#![allow(clippy::useless_conversion)]
98100
fn from(user_type: UserType) -> CK_USER_TYPE {
99101
match user_type {
100102
UserType::So => CKU_SO,
101103
UserType::User => CKU_USER,
102104
UserType::ContextSpecific => CKU_CONTEXT_SPECIFIC,
103-
UserType::VendorExtension(n) => n as CK_USER_TYPE,
105+
UserType::VendorExtension(n) => n.into(),
104106
}
105107
}
106108
}

0 commit comments

Comments
 (0)