Skip to content

Commit

Permalink
Make TypedHeaderRejectionReason #[non_exhaustive] (#665)
Browse files Browse the repository at this point in the history
* Make `TypedHeaderRejectionReason` `#[non_exhaustive]`

Fixes #660

* add changelog pr link
  • Loading branch information
davidpdrsn committed Dec 27, 2021
1 parent b9e4c5e commit b807b52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions axum/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased

- **breaking:** Require `Output = ()` on `WebSocketStream::on_upgrade` ([#644])
- **breaking:** Make `TypedHeaderRejectionReason` `#[non_exhaustive]` ([#665])

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

# 0.4.3 (21. December, 2021)

Expand Down
1 change: 1 addition & 0 deletions axum/src/extract/typed_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl TypedHeaderRejection {

/// Additional information regarding a [`TypedHeaderRejection`](super::TypedHeaderRejection)
#[derive(Debug)]
#[non_exhaustive]
pub enum TypedHeaderRejectionReason {
/// The header was missing from the HTTP request
Missing,
Expand Down

0 comments on commit b807b52

Please sign in to comment.