mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
upgrade example to actix-web 0.7
This commit is contained in:
@ -26,7 +26,7 @@ pub struct MyObj {
|
||||
}
|
||||
|
||||
/// This handler uses `ProtoBufMessage` for loading protobuf object.
|
||||
fn index(req: HttpRequest) -> Box<Future<Item = HttpResponse, Error = Error>> {
|
||||
fn index(req: &HttpRequest) -> Box<Future<Item = HttpResponse, Error = Error>> {
|
||||
protobuf::ProtoBufMessage::new(req)
|
||||
.from_err() // convert all errors into `Error`
|
||||
.and_then(|val: MyObj| {
|
||||
|
Reference in New Issue
Block a user