From 1c87efd27af94d065dc581b117bc93d0b7d752cc Mon Sep 17 00:00:00 2001
From: Jean-Michel Picod <jmichel@google.com>
Date: Mon, 2 Mar 2020 15:13:19 +0100
Subject: [PATCH] Fix clippy warnings.

Because of libtock-rs we can't run clippy on our codebase. But it could
run at least on `build.rs`.
---
 build.rs | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/build.rs b/build.rs
index 70844b0..c8c9007 100644
--- a/build.rs
+++ b/build.rs
@@ -35,9 +35,8 @@ fn main() {
 
     // Load the OpenSSL PEM ECC key
     let ecc_data = include_bytes!("crypto_data/opensk.key");
-    let pkey = ec::EcKey::private_key_from_pem(ecc_data)
-        .ok()
-        .expect("Failed to load OpenSK private key file");
+    let pkey =
+        ec::EcKey::private_key_from_pem(ecc_data).expect("Failed to load OpenSK private key file");
 
     // Check key validity
     pkey.check_key().unwrap();
@@ -70,9 +69,7 @@ fn main() {
 
     // Convert the PEM certificate to DER and extract the serial for AAGUID
     let input_pem_cert = include_bytes!("crypto_data/opensk_cert.pem");
-    let cert = x509::X509::from_pem(input_pem_cert)
-        .ok()
-        .expect("Failed to load OpenSK certificate");
+    let cert = x509::X509::from_pem(input_pem_cert).expect("Failed to load OpenSK certificate");
 
     // Do some sanity check on the certificate
     assert!(cert
-- 
GitLab