Fix clippy lints

This commit is contained in:
Anthony Ramine 2024-03-23 10:12:15 +01:00 committed by Rushil Mehra
parent 713558993a
commit 30b33991e5
2 changed files with 2 additions and 4 deletions

View File

@ -35,7 +35,7 @@ mod test;
fn key_index() -> Result<Index<Ssl, SessionKey>, ErrorStack> { fn key_index() -> Result<Index<Ssl, SessionKey>, ErrorStack> {
static IDX: OnceCell<Index<Ssl, SessionKey>> = OnceCell::new(); static IDX: OnceCell<Index<Ssl, SessionKey>> = OnceCell::new();
IDX.get_or_try_init(Ssl::new_ex_index).map(|v| *v) IDX.get_or_try_init(Ssl::new_ex_index).copied()
} }
#[derive(Clone)] #[derive(Clone)]

View File

@ -31,9 +31,7 @@ async fn test() {
unsafe { unsafe {
builder.set_async_get_session_callback(|_, _| { builder.set_async_get_session_callback(|_, _| {
let Some(der) = SERVER_SESSION_DER.get() else { let der = SERVER_SESSION_DER.get()?;
return None;
};
Some(Box::pin(async move { Some(Box::pin(async move {
yield_now().await; yield_now().await;