mirror of
https://github.com/actix/actix-web.git
synced 2024-12-30 03:50:42 +00:00
clippy warnings
This commit is contained in:
parent
84bf282c17
commit
d2693d58a8
1 changed files with 9 additions and 10 deletions
|
@ -445,7 +445,7 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
|
|||
|
||||
fn handle(&mut self, req: HttpRequest<S>) -> 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,
|
||||
|
@ -470,16 +470,15 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
|
|||
.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))?
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue