From a4c933e56e0cb9c10b2857bb289886b3def142c5 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 11 Mar 2018 09:36:54 -0700 Subject: [PATCH] update doc string --- guide/src/qs_4.md | 3 ++- src/handler.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/guide/src/qs_4.md b/guide/src/qs_4.md index be3d6cf3..2f96ddd0 100644 --- a/guide/src/qs_4.md +++ b/guide/src/qs_4.md @@ -238,9 +238,10 @@ Both methods could be combined. (i.e Async response with streaming body) ## Different return types (Either) Sometimes you need to return different types of responses. For example -you can do error check and return error, otherwise return async response. +you can do error check and return error and return async response otherwise. Or any result that requires two different types. For this case [*Either*](../actix_web/enum.Either.html) type can be used. +*Either* allows to combine two different responder types into a single type. ```rust # extern crate actix_web; diff --git a/src/handler.rs b/src/handler.rs index 498da39d..035d02fa 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -34,7 +34,7 @@ pub trait Responder { fn respond_to(self, req: HttpRequest) -> Result; } -/// Combines two different responders types into a single type +/// Combines two different responder types into a single type /// /// ```rust /// # extern crate actix_web;