Skip to content

Commit

Permalink
impl IntoResponseParts for ()
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn committed Dec 30, 2023
1 parent 3b43b25 commit ebc3606
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion axum-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# Unreleased

- None.
- **added:** Implement `IntoResponseParts` `()` ([#2471])

[#2471]: https://github.com/tokio-rs/axum/pull/2471

# 0.4.2 (29. December, 2023)

Expand Down
8 changes: 8 additions & 0 deletions axum-core/src/response/into_response_parts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,11 @@ impl IntoResponseParts for Extensions {
Ok(res)
}
}

impl IntoResponseParts for () {
type Error = Infallible;

fn into_response_parts(self, res: ResponseParts) -> Result<ResponseParts, Self::Error> {
Ok(res)
}
}

0 comments on commit ebc3606

Please sign in to comment.