Skip to content

Commit b782f23

Browse files
committed
Small simplifications in response parsing
1 parent b4f7dc0 commit b782f23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/response.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ where
3030
match response {
3131
Output::Success(success) => {
3232
trace!("Received json result: {}", success.result);
33-
serde_json::from_value::<R>(success.result)
33+
serde_json::from_value(success.result)
3434
.chain_err(|| ErrorKind::ResponseError("Not valid for target type"))
3535
}
36-
Output::Failure(failure) => Err(ErrorKind::JsonRpcError(failure.error).into()),
36+
Output::Failure(failure) => bail!(ErrorKind::JsonRpcError(failure.error)),
3737
}
3838
}

0 commit comments

Comments
 (0)