Skip to content

Add From impls for extract::ws::Message - #1421

Merged
davidpdrsn merged 2 commits into
tokio-rs:mainfrom
Rapptz:feature/from-impls-tungstenite
Sep 26, 2022
Merged

Add From impls for extract::ws::Message#1421
davidpdrsn merged 2 commits into
tokio-rs:mainfrom
Rapptz:feature/from-impls-tungstenite

Conversation

@Rapptz

@Rapptz Rapptz commented Sep 26, 2022

Copy link
Copy Markdown
Contributor

Motivation

I wanted to do something like ws.send("hello".into()).await? but the From impls in tungstenite were not exposed.

Solution

This merely reimplements those From impls from tungstenite.

These come from tungstenite but were not exposed by axum
@jplatte

jplatte commented Sep 26, 2022

Copy link
Copy Markdown
Contributor

Thanks for the PR! Can you add a changelog entry?

@davidpdrsn davidpdrsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nvm - jplatte was faster 😅

@Rapptz

Rapptz commented Sep 26, 2022

Copy link
Copy Markdown
Contributor Author

I've added the changelog entry, unsure if the wording needs tweaking!

@davidpdrsn davidpdrsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@davidpdrsn
davidpdrsn enabled auto-merge (squash) September 26, 2022 18:59
@davidpdrsn
davidpdrsn merged commit fef95bf into tokio-rs:main Sep 26, 2022
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.

3 participants