Simplify the HttpRoute trait

Previously the HttpRoute has logic to clone the handler parameter,
which is an implementation detail of the API server. So simplify
the HttpRoute interfaces by removing the argument cloning logic.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
This commit is contained in:
Liu Jiang
2020-03-23 21:27:04 +08:00
committed by Adrian Catangiu
parent ac3bb940ab
commit 8ca0839b58
2 changed files with 9 additions and 36 deletions

View File

@@ -121,5 +121,5 @@ pub use self::common::{Body, Method, Version};
pub use self::connection::{ConnectionError, HttpConnection};
pub use self::request::{Request, RequestError};
pub use self::response::{Response, StatusCode};
pub use self::router::{EndpointHandler, HttpRoutes, RouteError, TryClone};
pub use self::router::{EndpointHandler, HttpRoutes, RouteError};
pub use self::server::{HttpServer, ServerError, ServerRequest, ServerResponse};