From 635c8bcbed064eb7fa14337c581b595ef7e2e4ce Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 28 Jun 2024 11:38:59 +0200 Subject: [PATCH] client: clippy: factor out complex type Signed-off-by: Wolfgang Bumiller --- proxmox-client/src/client.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxmox-client/src/client.rs b/proxmox-client/src/client.rs index fe18097a..b840831d 100644 --- a/proxmox-client/src/client.rs +++ b/proxmox-client/src/client.rs @@ -22,6 +22,8 @@ use crate::{Error, Token}; use super::{HttpApiClient, HttpApiResponse}; +/// See [`set_verify_callback`](openssl::ssl::SslContextBuilder::set_verify_callback()). +pub type TlsCallback = dyn Fn(bool, &mut x509::X509StoreContextRef) -> bool + Send + Sync + 'static; #[derive(Default)] pub enum TlsOptions { /// Default TLS verification. @@ -38,7 +40,7 @@ pub enum TlsOptions { CaCert(X509), /// Use a callback for certificate verification. - Callback(Box bool + Send + Sync + 'static>), + Callback(Box), } impl TlsOptions { -- 2.39.5