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<Self, (Status, Self::Error), ()> {
+ async fn from_request(request: &'r Request<'_>) -> Outcome<Self, (Status, Self::Error), Status> {
This commit is contained in:
parent
82f9519f95
commit
96ba2d5d74
@ -126,7 +126,7 @@ where
|
|||||||
{
|
{
|
||||||
type Error = ();
|
type Error = ();
|
||||||
|
|
||||||
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, (Status, Self::Error), ()> {
|
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, (Status, Self::Error), Status> {
|
||||||
let store = request.guard::<&State<SessionStore<D>>>().await.unwrap();
|
let store = request.guard::<&State<SessionStore<D>>>().await.unwrap();
|
||||||
Outcome::Success(Session {
|
Outcome::Success(Session {
|
||||||
id: request.local_cache(|| {
|
id: request.local_cache(|| {
|
||||||
@ -321,7 +321,7 @@ where
|
|||||||
|
|
||||||
if !session.0.is_empty() {
|
if !session.0.is_empty() {
|
||||||
response.adjoin_header(
|
response.adjoin_header(
|
||||||
Cookie::build(self.config.cookie_name.clone(), session.to_string())
|
Cookie::build((self.config.cookie_name.clone(), session.to_string()))
|
||||||
.path("/")
|
.path("/")
|
||||||
.finish(),
|
.finish(),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user