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

Undeprecate {content_type,accept}_header_classifier from aws-smithy-http-server #2604

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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