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

Add struct NoContent as a self-described shortcut #2978

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Oct 11, 2024

Motivation

Refs: #2363, #2393

Solution

We cannot change the behavior of <() as IntoResponse>::into_response, so let's add a newtype struct to explicitly use 204 No Content status.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Thanks!

@jplatte jplatte enabled auto-merge (squash) October 11, 2024 15:43
@jplatte jplatte disabled auto-merge October 11, 2024 15:46
axum/CHANGELOG.md Outdated Show resolved Hide resolved
We cannot change the behavior of `<() as IntoResponse>::into_response`,
so add a newtype struct to explicitly use 204 No Content status.

Refs: tokio-rs#2363, tokio-rs#2393
@jplatte jplatte enabled auto-merge (squash) October 11, 2024 15:52
@jplatte jplatte merged commit 0712a46 into tokio-rs:main Oct 11, 2024
18 checks passed
@oxalica oxalica deleted the feat/no-content-resp branch October 11, 2024 15:54
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