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 e049ade
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion axum-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# Unreleased

- None.
- **added:** Implement `IntoResponseParts` `()`

# 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 e049ade

Please sign in to comment.