Skip to content

Commit

Permalink
Undeprecate {content_type,accept}_header_classifier from `aws-smith…
Browse files Browse the repository at this point in the history
…y-http-server`

These functions were mistakenly deprecated when deprecating the old
service builder API in #1886.

However, they're fine, and they're internally used by the generated
server SDKs.
The module they reside in is `#[doc(hidden)]`.
  • Loading branch information
david-perez committed Apr 20, 2023
1 parent 165253c commit 9cfb0d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rust-runtime/aws-smithy-http-server/src/protocols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn parse_content_type(headers: &HeaderMap) -> Result<mime::Mime, MissingContentT
}

/// Checks that the `content-type` header is valid.
#[allow(deprecated, clippy::result_large_err)]
#[allow(clippy::result_large_err)]
pub fn content_type_header_classifier(
headers: &HeaderMap,
expected_content_type: Option<&'static str>,
Expand Down Expand Up @@ -66,7 +66,6 @@ pub fn content_type_header_classifier(
Ok(())
}

#[allow(deprecated)]
pub fn accept_header_classifier(headers: &HeaderMap, content_type: &'static str) -> bool {
if !headers.contains_key(http::header::ACCEPT) {
return true;
Expand Down Expand Up @@ -105,7 +104,6 @@ pub fn accept_header_classifier(headers: &HeaderMap, content_type: &'static str)
})
}

#[allow(deprecated)]
#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 9cfb0d4

Please sign in to comment.