mirror of
https://github.com/actix/actix-extras.git
synced 2024-12-01 02:44:37 +01:00
clippy warnings
This commit is contained in:
parent
84bf282c17
commit
d2693d58a8
@ -445,7 +445,7 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
|
|||||||
|
|
||||||
fn handle(&mut self, req: HttpRequest<S>) -> Self::Result {
|
fn handle(&mut self, req: HttpRequest<S>) -> Self::Result {
|
||||||
if !self.accessible {
|
if !self.accessible {
|
||||||
return Ok(self.default.handle(req))
|
Ok(self.default.handle(req))
|
||||||
} else {
|
} else {
|
||||||
let relpath = match req.match_info().get("tail").map(PathBuf::from_param) {
|
let relpath = match req.match_info().get("tail").map(PathBuf::from_param) {
|
||||||
Some(Ok(path)) => path,
|
Some(Ok(path)) => path,
|
||||||
@ -470,16 +470,15 @@ impl<S: 'static> Handler<S> for StaticFiles<S> {
|
|||||||
.finish().unwrap()
|
.finish().unwrap()
|
||||||
.respond_to(req.without_state())
|
.respond_to(req.without_state())
|
||||||
} else if self.show_index {
|
} else if self.show_index {
|
||||||
Directory::new(self.directory.clone(), path).respond_to(req.without_state())
|
Directory::new(self.directory.clone(), path)
|
||||||
.map_err(|error| Error::from(error))?
|
.respond_to(req.without_state())?
|
||||||
.respond_to(req.without_state())
|
.respond_to(req.without_state())
|
||||||
} else {
|
} else {
|
||||||
Ok(self.default.handle(req))
|
Ok(self.default.handle(req))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
NamedFile::open(path)?.set_cpu_pool(self.cpu_pool.clone())
|
NamedFile::open(path)?.set_cpu_pool(self.cpu_pool.clone())
|
||||||
.respond_to(req.without_state())
|
.respond_to(req.without_state())?
|
||||||
.map_err(|error| Error::from(error))?
|
|
||||||
.respond_to(req.without_state())
|
.respond_to(req.without_state())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user