I created a test_subscription_callback function to get rid of code repetition in the subscription callback tests.
I added few conventions to the contribution document. It might be worth discussing.
I replaced all the unwrap in the code with expect. I found some usages of unwraps in the actual library code, they certainly assume the unwrap/expect will never fail.
I also removed some println!s that were polluting the test command output.5. This is quite unrelated to the purpose of this PR, but I just renamed NashStream to NashWebsocket to match the naming to BinanceWebsocket and CoinbaseWebsocket. But maybe we want to do it in the opposite direction?
Regarding 3.: There are still some println! in the tests that should be removed and replaced with proper tests. But it seemed a lot of work to do in this PR. I will leave it for later and go back to #121
Here are the points to review in this PR:
test_subscription_callback
function to get rid of code repetition in the subscription callback tests.unwrap
in the code withexpect
. I found some usages of unwraps in the actual library code, they certainly assume theunwrap
/expect
will never fail.println!
s that were polluting the test command output.5. This is quite unrelated to the purpose of this PR, but I just renamedNashStream
toNashWebsocket
to match the naming toBinanceWebsocket
andCoinbaseWebsocket
. But maybe we want to do it in the opposite direction?Regarding 3.: There are still some
println!
in the tests that should be removed and replaced with proper tests. But it seemed a lot of work to do in this PR. I will leave it for later and go back to #121