From c3b50e4ecc5fa8e0318a038686a9b58ab67489e0 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Wed, 28 Aug 2024 14:51:32 +0400 Subject: [PATCH] style: add impl Default --- src/certs/allow_all.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/certs/allow_all.rs b/src/certs/allow_all.rs index d204116..7a2ee68 100644 --- a/src/certs/allow_all.rs +++ b/src/certs/allow_all.rs @@ -13,8 +13,15 @@ use tokio_rustls::rustls::{ #[derive(Debug)] pub struct AllowAllCertVerifier(Arc); +impl Default for AllowAllCertVerifier { + /// Same as [`AllowAllCertVerifier::new()`]. + fn default() -> Self { + Self::new() + } +} + impl AllowAllCertVerifier { - /// Constructor for this verifier + /// Constructor for this verifier. pub fn new() -> Self { AllowAllCertVerifier( CryptoProvider::get_default()