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
Refactor: assorted code readability improvements in h1/conn.rs
#2817
Conversation
It turns out `Copy` was not implemented. Oops!
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.
Thanks so much! This does indeed improve readability in various places. I did leave a comment inline, but I don't know if I want action on it or not... mostly just want to make a record of it...
Everything seems to be in order now. Please do let me know if there are any other concerns. Thanks! |
Very nice, thanks again! |
Hello there! This PR features assorted refactoring techniques that hopefully improves readability. No behavior change is expected.
Most of the refactoring involved using the🎉
matches!
macro instead of explicit Booleanmatch
expressions. Other refactoring involved transforming logic to early returns. The overall result is that the code is now a little bit less nested.With that said, please feel free to inform me if some of the changes need improvement. Thanks!