1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

fix typos in guide

This commit is contained in:
Nikolay Kim
2017-12-20 23:27:30 -08:00
parent 55534bff8c
commit 0567e6fb0a
2 changed files with 8 additions and 6 deletions

View File

@@ -57,7 +57,7 @@ struct MyObj {
name: &'static str,
}
/// we have to convert Error into HttpResponse as well
/// Responder
impl Responder for MyObj {
type Item = HttpResponse;
type Error = Error;
@@ -72,6 +72,7 @@ impl Responder for MyObj {
}
}
/// Because `MyObj` implements `Responder`, it is possible to return it directly
fn index(req: HttpRequest) -> MyObj {
MyObj{name: "user"}
}