Skip to content

Commit

Permalink
Fix trivial numeric cast lint
Browse files Browse the repository at this point in the history
Change-Id: I9bac0174e69847decf549e53b77d9f26151e00e8
  • Loading branch information
larper2axis committed Sep 4, 2024
1 parent b182bc5 commit 901e880
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cryptoki/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ pub enum UserType {
}

impl From<UserType> for CK_USER_TYPE {
// Mask lint for n.into() on 32-bit systems.
#![allow(clippy::useless_conversion)]
fn from(user_type: UserType) -> CK_USER_TYPE {
match user_type {
UserType::So => CKU_SO,
UserType::User => CKU_USER,
UserType::ContextSpecific => CKU_CONTEXT_SPECIFIC,
UserType::VendorExtension(n) => n as CK_USER_TYPE,
UserType::VendorExtension(n) => n.into(),
}
}
}

0 comments on commit 901e880

Please sign in to comment.