From 53d491e4a65b4bee16c3d61a6abf9a3dd321d623 Mon Sep 17 00:00:00 2001 From: Qi Yu Date: Sat, 27 Oct 2018 07:24:47 +0800 Subject: [PATCH] Fixed Either sample code --- content/docs/handlers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/handlers.md b/content/docs/handlers.md index 975d7d2..f0bdc36 100644 --- a/content/docs/handlers.md +++ b/content/docs/handlers.md @@ -278,7 +278,7 @@ use actix_web::{Either, Error, HttpResponse}; type RegisterResult = Either>>; -fn index(req: &HttpRequest) -> impl Responder { +fn index(req: &HttpRequest) -> RegisterResult { if is_a_variant() { // <- choose variant A Either::A( HttpResponse::BadRequest().body("Bad data"))