Skip to content
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 Yamux::close to use ? #2677

Merged
merged 3 commits into from
May 31, 2022
Merged

Refactor Yamux::close to use ? #2677

merged 3 commits into from
May 31, 2022

Conversation

thomaseizinger
Copy link
Contributor

Description

(Hopefully) improves readability of the implementation due to reduced noise.

Links to any relevant issues

Extracted out of #2648.

Open Questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Some(Ok(_)) => {} // drop inbound stream
Some(Err(e)) => return Poll::Ready(Err(e)),

while let Poll::Ready(_inbound_stream) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while let Poll::Ready(_inbound_stream) =
while let Poll::Ready(inbound_stream) =

Why prefix inbound_stream with an _?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it more obvious that it will be unused but I guess technically it is not unused!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to improve this with 6eb64fe.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mxinden mxinden merged commit 3611d69 into master May 31, 2022
@thomaseizinger thomaseizinger deleted the refactor/yamux-poll branch August 2, 2022 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants