@@ -5,10 +5,10 @@ use super::{
55 SslVerifyMode ,
66} ;
77use crate :: ex_data:: Index ;
8- use once_cell:: sync:: Lazy ;
98use std:: convert:: identity;
109use std:: future:: Future ;
1110use std:: pin:: Pin ;
11+ use std:: sync:: LazyLock ;
1212use std:: task:: { ready, Context , Poll , Waker } ;
1313
1414/// The type of futures to pass to [`SslContextBuilderExt::set_async_select_certificate_callback`].
@@ -42,19 +42,20 @@ pub type BoxCustomVerifyFinish = Box<dyn FnOnce(&mut SslRef) -> Result<(), SslAl
4242/// Public for documentation purposes.
4343pub type ExDataFuture < T > = Pin < Box < dyn Future < Output = T > + Send > > ;
4444
45- pub ( crate ) static TASK_WAKER_INDEX : Lazy < Index < Ssl , Option < Waker > > > =
46- Lazy :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
47- pub ( crate ) static SELECT_CERT_FUTURE_INDEX : Lazy < Index < Ssl , MutOnly < Option < BoxSelectCertFuture > > > > =
48- Lazy :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
49- pub ( crate ) static SELECT_PRIVATE_KEY_METHOD_FUTURE_INDEX : Lazy <
45+ pub ( crate ) static TASK_WAKER_INDEX : LazyLock < Index < Ssl , Option < Waker > > > =
46+ LazyLock :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
47+ pub ( crate ) static SELECT_CERT_FUTURE_INDEX : LazyLock <
48+ Index < Ssl , MutOnly < Option < BoxSelectCertFuture > > > ,
49+ > = LazyLock :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
50+ pub ( crate ) static SELECT_PRIVATE_KEY_METHOD_FUTURE_INDEX : LazyLock <
5051 Index < Ssl , MutOnly < Option < BoxPrivateKeyMethodFuture > > > ,
51- > = Lazy :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
52- pub ( crate ) static SELECT_GET_SESSION_FUTURE_INDEX : Lazy <
52+ > = LazyLock :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
53+ pub ( crate ) static SELECT_GET_SESSION_FUTURE_INDEX : LazyLock <
5354 Index < Ssl , MutOnly < Option < BoxGetSessionFuture > > > ,
54- > = Lazy :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
55- pub ( crate ) static SELECT_CUSTOM_VERIFY_FUTURE_INDEX : Lazy <
55+ > = LazyLock :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
56+ pub ( crate ) static SELECT_CUSTOM_VERIFY_FUTURE_INDEX : LazyLock <
5657 Index < Ssl , MutOnly < Option < BoxCustomVerifyFuture > > > ,
57- > = Lazy :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
58+ > = LazyLock :: new ( || Ssl :: new_ex_index ( ) . unwrap ( ) ) ;
5859
5960impl SslContextBuilder {
6061 /// Sets a callback that is called before most [`ClientHello`] processing
0 commit comments