aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorboasting-squirrel <boasting.squirrel@gmail.com>2019-02-13 17:51:51 +0000
committerboasting-squirrel <boasting.squirrel@gmail.com>2019-02-13 17:51:51 +0000
commitd410b27e85ffa653a64d10bcd6b43cc5f64fe5d9 (patch)
tree50bed1bf017347115b70db35c5034ae46695f182 /src/auth.rs
parentFixed Clippy warnings (diff)
downloadminiserve-d410b27e85ffa653a64d10bcd6b43cc5f64fe5d9.tar.gz
miniserve-d410b27e85ffa653a64d10bcd6b43cc5f64fe5d9.zip
Removed config.rs and put back actix config in main.rs
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs6
1 files changed, 2 insertions, 4 deletions
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<config::MiniserveConfig> for Auth {
+impl Middleware<crate::MiniserveConfig> for Auth {
fn response(
&self,
- req: &HttpRequest<config::MiniserveConfig>,
+ req: &HttpRequest<crate::MiniserveConfig>,
resp: HttpResponse,
) -> Result<Response> {
if let Some(ref required_auth) = req.state().auth {