From c0d517f84c266a342b739ac64a100630dc76320e Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Mon, 30 Apr 2018 12:55:16 +0200 Subject: Fix for stable --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3db64d8..659d529 100644 --- a/src/main.rs +++ b/src/main.rs @@ -162,7 +162,7 @@ struct Auth; impl Middleware for Auth { fn response(&self, req: &mut HttpRequest, resp: HttpResponse) -> Result { - if let Some(required_auth) = &req.state().auth { + if let &Some(ref required_auth) = &req.state().auth { if let Some(auth_headers) = req.headers().get(header::AUTHORIZATION) { let auth_req = match parse_basic_auth(auth_headers) { Ok(auth_req) => auth_req, -- cgit v1.2.3