style: add impl Default

This commit is contained in:
DarkCat09 2024-08-28 14:51:32 +04:00
parent 67864e4842
commit c3b50e4ecc
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

View file

@ -13,8 +13,15 @@ use tokio_rustls::rustls::{
#[derive(Debug)]
pub struct AllowAllCertVerifier(Arc<CryptoProvider>);
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()