-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: recursive call in connection State
conversion to i32
#1010
fix: recursive call in connection State
conversion to i32
#1010
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, while you’re doing this could you replace TryFrom<i32>
implementation to call Self::from_i32
(or the other way around)?
Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch @dhruvja, thank you for the fix.
State
conversion to i32
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1010 +/- ##
=======================================
Coverage 70.69% 70.70%
=======================================
Files 178 178
Lines 17870 17865 -5
=======================================
- Hits 12634 12631 -3
+ Misses 5236 5234 -2 ☔ View full report in Codecov by Sentry. |
Spent quite a while figuring out the vague |
* fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]> * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]>
* fix: packet sequence in Timeout handlers should be encoded in big-endian (#1004) * fix: encode package sequence into big endian bytes * Fix this issue in `to_vec` method. * fix: recursive call in connection `State` conversion to `i32` (#1010) * fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]> * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]> * Release v0.48.2 chore: update changelog + summary deps: bump versions to v0.48.2 --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Yuanchao Sun <[email protected]> Co-authored-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]>
* fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]> * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]>
* fix: packet sequence in Timeout handlers should be encoded in big-endian (#1004) * fix: encode package sequence into big endian bytes * Fix this issue in `to_vec` method. * fix: recursive call in connection `State` conversion to `i32` (#1010) * fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]> * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]> * Release v0.48.2 chore: update changelog + summary deps: bump versions to v0.48.2 --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Yuanchao Sun <[email protected]> Co-authored-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]>
Closes: #1009
Description
Since the conversion from
state
toi32
causes a recursive call, it can be solved by matching the enum variants and returning the i32 for the respective variant.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.