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

Require Output = () on WebSocketStream::on_upgrade #636

Closed
SabrinaJewson opened this issue Dec 17, 2021 · 2 comments
Closed

Require Output = () on WebSocketStream::on_upgrade #636

SabrinaJewson opened this issue Dec 17, 2021 · 2 comments
Labels
A-axum C-enhancement Category: A PR with an enhancement E-help-wanted Call for participation: Help is requested to fix this issue.
Milestone

Comments

@SabrinaJewson
Copy link
Contributor

Feature Request

Motivation

By accepting a future with any return type, users can easily make a mistake if they for example give a future that outputs a Result, not realizing that the Result will simply be ignored.

Proposal

Change the bound on WebSocketUpgrade::on_upgrade to Fut: Future<Output = ()> in 0.5.

@davidpdrsn
Copy link
Member

Makes sense 👍

@davidpdrsn davidpdrsn added this to the 0.5 milestone Dec 17, 2021
@davidpdrsn davidpdrsn added A-axum C-enhancement Category: A PR with an enhancement E-help-wanted Call for participation: Help is requested to fix this issue. labels Dec 17, 2021
@davidpdrsn
Copy link
Member

Fixed in #646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-axum C-enhancement Category: A PR with an enhancement E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

No branches or pull requests

2 participants