From e42d242868efc60de9bc2e710d6d998ee68374f1 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Sat, 8 Jun 2019 16:16:25 +0200 Subject: [PATCH] Remove useless closures --- acme_common/src/crypto/openssl_keys.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/acme_common/src/crypto/openssl_keys.rs b/acme_common/src/crypto/openssl_keys.rs index e9c6a29..8268035 100644 --- a/acme_common/src/crypto/openssl_keys.rs +++ b/acme_common/src/crypto/openssl_keys.rs @@ -84,9 +84,7 @@ impl PublicKey { } pub fn to_pem(&self) -> Result, Error> { - self.inner_key - .public_key_to_pem() - .map_err(|e| Error::from(e)) + self.inner_key.public_key_to_pem().map_err(Error::from) } } @@ -108,7 +106,7 @@ impl PrivateKey { pub fn to_pem(&self) -> Result, Error> { self.inner_key .private_key_to_pem_pkcs8() - .map_err(|e| Error::from(e)) + .map_err(Error::from) } pub fn sign(&self, data: &[u8]) -> Result, Error> {