1
0
mirror of https://github.com/actix/examples synced 2025-06-28 18:00:37 +02:00

resolved formatting

This commit is contained in:
dowwie
2020-01-31 07:21:39 -05:00
parent da72aef69c
commit 04cebf6899
4 changed files with 19 additions and 23 deletions

View File

@ -92,13 +92,11 @@ async fn main() -> io::Result<()> {
_ => HttpResponse::NotFound(),
}),
)
.service(web::resource("/error").to(|| {
async {
error::InternalError::new(
io::Error::new(io::ErrorKind::Other, "test"),
StatusCode::INTERNAL_SERVER_ERROR,
)
}
.service(web::resource("/error").to(|| async {
error::InternalError::new(
io::Error::new(io::ErrorKind::Other, "test"),
StatusCode::INTERNAL_SERVER_ERROR,
)
}))
// static files
.service(fs::Files::new("/static", "static").show_files_listing())