Skip to content

Commit

Permalink
Fix deprecated use of RPC trait object without dyn (#615)
Browse files Browse the repository at this point in the history
Adds dyn keyword to OwnerRpc and ForeignRpc trait objects

Fixes deprecation warning
  • Loading branch information
GeneFerneau committed May 19, 2021
1 parent b7f587f commit 18361da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,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 OwnerRpc::handle_request(&*api, val) {
match <dyn OwnerRpc>::handle_request(&*api, val) {
MaybeReply::Reply(mut r) => {
let (_was_error, unencrypted_intercept) =
OwnerV3Helpers::check_error_response(&r.clone());
Expand Down Expand Up @@ -691,7 +691,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 18361da

Please sign in to comment.