From d2693d58a806d6bde9b15df7517a45a408396c6d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 16 Mar 2018 12:12:55 -0700 Subject: [PATCH] clippy warnings --- src/fs.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index 57857e152..8026fd857 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -445,7 +445,7 @@ impl Handler for StaticFiles { fn handle(&mut self, req: HttpRequest) -> Self::Result { if !self.accessible { - return Ok(self.default.handle(req)) + Ok(self.default.handle(req)) } else { let relpath = match req.match_info().get("tail").map(PathBuf::from_param) { Some(Ok(path)) => path, @@ -466,21 +466,20 @@ impl Handler for StaticFiles { } new_path.push_str(redir_index); HttpFound.build() - .header(header::http::LOCATION, new_path.as_str()) - .finish().unwrap() - .respond_to(req.without_state()) + .header(header::http::LOCATION, new_path.as_str()) + .finish().unwrap() + .respond_to(req.without_state()) } else if self.show_index { - Directory::new(self.directory.clone(), path).respond_to(req.without_state()) - .map_err(|error| Error::from(error))? - .respond_to(req.without_state()) + Directory::new(self.directory.clone(), path) + .respond_to(req.without_state())? + .respond_to(req.without_state()) } else { Ok(self.default.handle(req)) } } else { NamedFile::open(path)?.set_cpu_pool(self.cpu_pool.clone()) - .respond_to(req.without_state()) - .map_err(|error| Error::from(error))? - .respond_to(req.without_state()) + .respond_to(req.without_state())? + .respond_to(req.without_state()) } } }