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"))