rm comments

This commit is contained in:
realaravinth 2021-12-18 19:39:59 +05:30
parent 7a76214701
commit 708a157ee1
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -14,9 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#![allow(clippy::type_complexity)]
//use std::task::{Context, Poll};
use actix_http::body::AnyBody;
use actix_identity::Identity;
@ -58,32 +56,9 @@ where
type Error = Error;
type Future = Either<S::Future, Ready<Result<Self::Response, Self::Error>>>;
// fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
// self.service.poll_ready(cx)
// }
//
actix_service::forward_ready!(service);
fn call(&self, req: ServiceRequest) -> Self::Future {
// let (r, mut pl) = req.into_parts();
// // TODO investigate when the bellow statement will
// // return error
// if let Ok(Some(_)) = Identity::from_request(&r, &mut pl)
// .into_inner()
// .map(|x| x.identity())
// {
// let req = ServiceRequest::from_parts(r, pl);
// Either::Left(self.service.call(req))
// } else {
// let resp = actix_http::ResponseBuilder::new(http::StatusCode::FOUND)
// .insert_header((http::header::LOCATION, PAGES.auth.login))
// .finish();
// let req = ServiceRequest::from_parts(r, pl);
// Either::Right(ok(req.into_response(resp)))
// }
let (r, mut pl) = req.into_parts();
// TODO investigate when the bellow statement will