Skip to content

Commit

Permalink
Small simplifications in response parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Mar 7, 2018
1 parent b4f7dc0 commit b782f23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ where
match response {
Output::Success(success) => {
trace!("Received json result: {}", success.result);
serde_json::from_value::<R>(success.result)
serde_json::from_value(success.result)
.chain_err(|| ErrorKind::ResponseError("Not valid for target type"))
}
Output::Failure(failure) => Err(ErrorKind::JsonRpcError(failure.error).into()),
Output::Failure(failure) => bail!(ErrorKind::JsonRpcError(failure.error)),
}
}

0 comments on commit b782f23

Please sign in to comment.