Skip to content

Commit

Permalink
Fix deprecated use of RPC trait object without dyn
Browse files Browse the repository at this point in the history
  • Loading branch information
vekamo committed Mar 7, 2022
1 parent 1dd80c5 commit e9c8250
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controller/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ where

async fn call_api(req: Request<Body>, api: Owner<L, C, K>) -> Result<serde_json::Value, Error> {
let val: serde_json::Value = parse_body(req).await?;
match OwnerRpcV2::handle_request(&api, val) {
match <dyn OwnerRpcV2>::handle_request(&api, val) {
MaybeReply::Reply(r) => Ok(r),
MaybeReply::DontReply => {
// Since it's http, we need to return something. We return [] because jsonrpc
Expand Down Expand Up @@ -1406,7 +1406,7 @@ where
is_init_secure_api = OwnerV3Helpers::is_init_secure_api(&val);
// also need to intercept open/close wallet requests
let is_open_wallet = OwnerV3Helpers::is_open_wallet(&val);
match OwnerRpcV3::handle_request(&*api, val) {
match <dyn OwnerRpcV3>::handle_request(&*api, val) {
MaybeReply::Reply(mut r) => {
let (_was_error, unencrypted_intercept) =
OwnerV3Helpers::check_error_response(&r.clone());
Expand Down Expand Up @@ -1525,7 +1525,7 @@ where
api: Foreign<'static, L, C, K>,
) -> Result<serde_json::Value, Error> {
let val: serde_json::Value = parse_body(req).await?;
match ForeignRpc::handle_request(&api, val) {
match <dyn ForeignRpc>::handle_request(&api, val) {
MaybeReply::Reply(r) => Ok(r),
MaybeReply::DontReply => {
// Since it's http, we need to return something. We return [] because jsonrpc
Expand Down

0 comments on commit e9c8250

Please sign in to comment.