commits
This commit refactors the `unsubscribe_tokens` method in the `KiteTickerSubscriber` struct. Instead of directly unsubscribing the tokens and updating the `subscribed_tokens` field, it now uses a match statement to handle the result of the `unsubscribe_cmd` method. If the unsubscribe is successful, the tokens are removed from the `subscribed_tokens` using the `retain` method. If there is an error, it is returned.
The code changes in this commit ensure that the `subscribed_tokens` field is updated correctly when unsubscribing tokens.
Co-authored-by: Kaushik Chakraborty <git@kaushikc.org>
Note: Commit message is generated by AI. Please use with caution.
Signed-off-by: Kaushik Chakraborty <git@kaushikc.org>
This commit refactors the `unsubscribe_tokens` method in the `KiteTickerSubscriber` struct. Instead of directly unsubscribing the tokens and updating the `subscribed_tokens` field, it now uses a match statement to handle the result of the `unsubscribe_cmd` method. If the unsubscribe is successful, the tokens are removed from the `subscribed_tokens` using the `retain` method. If there is an error, it is returned.
The code changes in this commit ensure that the `subscribed_tokens` field is updated correctly when unsubscribing tokens.
Co-authored-by: Kaushik Chakraborty <git@kaushikc.org>
Note: Commit message is generated by AI. Please use with caution.