From d410b27e85ffa653a64d10bcd6b43cc5f64fe5d9 Mon Sep 17 00:00:00 2001 From: boasting-squirrel Date: Wed, 13 Feb 2019 18:51:51 +0100 Subject: Removed config.rs and put back actix config in main.rs --- src/auth.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 5d0bcaa..e39305c 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -2,8 +2,6 @@ use actix_web::http::header; use actix_web::middleware::{Middleware, Response}; use actix_web::{HttpRequest, HttpResponse, Result}; -use crate::config; - pub struct Auth; pub enum BasicAuthError { @@ -34,10 +32,10 @@ pub fn parse_basic_auth( }) } -impl Middleware for Auth { +impl Middleware for Auth { fn response( &self, - req: &HttpRequest, + req: &HttpRequest, resp: HttpResponse, ) -> Result { if let Some(ref required_auth) = req.state().auth { -- cgit v1.2.3