Skip to content

Commit eb11dcf

Browse files
committed
Clippy fixes
1 parent db28fba commit eb11dcf

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

src/cert.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,9 @@ impl CertContext {
142142
);
143143

144144
for (index, element) in elements.iter().enumerate() {
145-
if index != 0 {
146-
if 0 != ((**element).TrustStatus.dwInfoStatus
147-
& CERT_TRUST_IS_SELF_SIGNED)
148-
{
149-
break;
150-
}
145+
if index != 0 && 0 != ((**element).TrustStatus.dwInfoStatus
146+
& CERT_TRUST_IS_SELF_SIGNED) {
147+
break;
151148
}
152149

153150
let context = (**element).pCertContext;

src/signer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl CngSigner {
139139

140140
unsafe {
141141
let status = BCryptHash(
142-
alg as *mut core::ffi::c_void,
142+
alg,
143143
std::ptr::null_mut(), // pbSecret
144144
0, // cbSecret
145145
message.as_ptr() as *mut u8,

src/store.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,9 @@ impl CertStore {
227227
CERT_SHA256_HASH_PROP_ID,
228228
prop_data.as_mut_ptr() as *mut c_void,
229229
&mut prop_data_len,
230-
) != 0
231-
{
232-
if prop_data[..prop_data_len as usize] == sha256_hash[..] {
233-
let cert = CertDuplicateCertificateContext(cert);
234-
certs.push(CertContext::new_owned(cert))
235-
}
230+
) != 0 && prop_data[..prop_data_len as usize] == sha256_hash[..] {
231+
let cert = CertDuplicateCertificateContext(cert);
232+
certs.push(CertContext::new_owned(cert))
236233
}
237234
}
238235
}

0 commit comments

Comments
 (0)