diff --git a/src/server/formatter.rs b/src/server/formatter.rs index 28380937..ca2a6e73 100644 --- a/src/server/formatter.rs +++ b/src/server/formatter.rs @@ -11,7 +11,7 @@ pub struct ErrorMessageExtension(pub String); pub struct OutputFormatter { - pub format_data: fn(data: Value, rpcenv: &RpcEnvironment) -> Response
, + pub format_data: fn(data: Value, rpcenv: &dyn RpcEnvironment) -> Response, pub format_error: fn(err: Error) -> Response, } @@ -39,7 +39,7 @@ pub fn json_data_response(data: Value) -> Response { response } -fn json_format_data(data: Value, rpcenv: &RpcEnvironment) -> Response { +fn json_format_data(data: Value, rpcenv: &dyn RpcEnvironment) -> Response { let mut result = json!({ "data": data @@ -82,7 +82,7 @@ pub static JSON_FORMATTER: OutputFormatter = OutputFormatter { format_error: json_error_response, }; -fn extjs_format_data(data: Value, rpcenv: &RpcEnvironment) -> Response { +fn extjs_format_data(data: Value, rpcenv: &dyn RpcEnvironment) -> Response { let mut result = json!({ "data": data, diff --git a/src/server/rest.rs b/src/server/rest.rs index fe6172ba..445af4de 100644 --- a/src/server/rest.rs +++ b/src/server/rest.rs @@ -47,7 +47,7 @@ impl NewService for RestServer type Error = hyper::Error; type InitError = hyper::Error; type Service = ApiService; - type Future = Box