1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-21 13:15:38 +02:00

cleanup warnings

This commit is contained in:
Nikolay Kim
2018-07-04 21:01:27 +06:00
parent 4c5a63965e
commit 6fd686ef98
39 changed files with 116 additions and 226 deletions

View File

@@ -46,7 +46,6 @@
//! ));
//! }
//! ```
use std::cell::RefCell;
use std::rc::Rc;
use cookie::{Cookie, CookieJar, Key};
@@ -59,7 +58,6 @@ use http::header::{self, HeaderValue};
use httprequest::HttpRequest;
use httpresponse::HttpResponse;
use middleware::{Middleware, Response, Started};
use server::Request;
/// The helper trait to obtain your identity from a request.
///
@@ -109,13 +107,13 @@ impl<S> RequestIdentity for HttpRequest<S> {
}
fn remember(&self, identity: String) {
if let Some(mut id) = self.extensions_mut().get_mut::<IdentityBox>() {
if let Some(id) = self.extensions_mut().get_mut::<IdentityBox>() {
return id.0.as_mut().remember(identity);
}
}
fn forget(&self) {
if let Some(mut id) = self.extensions_mut().get_mut::<IdentityBox>() {
if let Some(id) = self.extensions_mut().get_mut::<IdentityBox>() {
return id.0.forget();
}
}