From 96ba2d5d74c63d7d4533083a01a6cf597c9761e9 Mon Sep 17 00:00:00 2001 From: YinMo19 Date: Tue, 17 Dec 2024 01:12:26 +0800 Subject: [PATCH] Fix compile error. - Cookie::build(self.config.cookie_name.clone(), session.to_string()) + Cookie::build((self.config.cookie_name.clone(), session.to_string())) - async fn from_request(request: &'r Request<'_>) -> Outcome { + async fn from_request(request: &'r Request<'_>) -> Outcome { --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 60c1f3e..d5a9e89 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,7 +126,7 @@ where { type Error = (); - async fn from_request(request: &'r Request<'_>) -> Outcome { + async fn from_request(request: &'r Request<'_>) -> Outcome { let store = request.guard::<&State>>().await.unwrap(); Outcome::Success(Session { id: request.local_cache(|| { @@ -321,7 +321,7 @@ where if !session.0.is_empty() { response.adjoin_header( - Cookie::build(self.config.cookie_name.clone(), session.to_string()) + Cookie::build((self.config.cookie_name.clone(), session.to_string())) .path("/") .finish(), );