From efa31bd686ad6753a6fb0e26463e707d7ddbb41c Mon Sep 17 00:00:00 2001 From: Rain Jiang Date: Wed, 22 Nov 2023 01:19:06 +0000 Subject: [PATCH] reformat source code file --- monolake-services/src/http/handlers/openid.rs | 4 +++- monolake-services/src/http/util.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/monolake-services/src/http/handlers/openid.rs b/monolake-services/src/http/handlers/openid.rs index 0e5c075..8166ab2 100644 --- a/monolake-services/src/http/handlers/openid.rs +++ b/monolake-services/src/http/handlers/openid.rs @@ -191,7 +191,9 @@ where let cookie = cookie.unwrap(); if cookie.name() == "session-id" { let session_store = SESSION_STORE.read().unwrap(); - if let Some(state) = session_store.get(cookie.value()) && state.access_token.is_some() { + if let Some(state) = session_store.get(cookie.value()) + && state.access_token.is_some() + { auth_cookie = Some(cookie.value().to_string()); } break; diff --git a/monolake-services/src/http/util.rs b/monolake-services/src/http/util.rs index 9bee718..b6c216b 100644 --- a/monolake-services/src/http/util.rs +++ b/monolake-services/src/http/util.rs @@ -37,7 +37,9 @@ where fn poll(self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll { let this = self.project(); - if this.accompany_slot.is_none() && let Poll::Ready(t) = this.accompany.poll(cx) { + if this.accompany_slot.is_none() + && let Poll::Ready(t) = this.accompany.poll(cx) + { *this.accompany_slot = Some(t); } this.main.poll(cx)