1
0
mirror of https://github.com/actix/examples synced 2025-08-21 06:15:43 +02:00

git push fix basics

This commit is contained in:
krircc
2018-04-15 10:45:30 +08:00
3 changed files with 2 additions and 3 deletions

View File

@@ -98,7 +98,6 @@ fn main() {
// async handler
.resource("/async/{name}", |r| r.method(Method::GET).a(index_async))
.resource("/test", |r| r.f(|req| {
println!("=============test=============");
match *req.method() {
Method::GET => HttpResponse::Ok(),
Method::POST => HttpResponse::MethodNotAllowed(),
@@ -106,7 +105,6 @@ fn main() {
}
}))
.resource("/error", |r| r.f(|req| {
println!("=============error=============");
error::InternalError::new(
io::Error::new(io::ErrorKind::Other, "test"), StatusCode::OK)
}))