Unverified Commit be9093c9 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Remove `once_cell` from public API (#2973)



## Motivation and Context
Addresses  7 in #2413 

## Description
This small PR removes uses of `once_cell` from public API. The
`http_versions` module in the `aws_smithy_http` crate was dead-code.

## Testing
Relies on existing tests in CI.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: default avatarysaito1001 <awsaito@amazon.com>
parent 2c27834f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -102,3 +102,15 @@ message = "Required members with @contextParam are now treated as client-side re
references = ["smithy-rs#2964"]
meta = { "breaking" = false, "tada" = false, "bug" = false, target = "client" }
author = "rcoh"

[[aws-sdk-rust]]
message = "Remove `once_cell` from public API"
references = ["smithy-rs#2973"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "ysaito1001"

[[smithy-rs]]
message = "Remove `once_cell` from public API"
references = ["smithy-rs#2973"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all" }
author = "ysaito1001"
+0 −3
Original line number Diff line number Diff line
@@ -26,9 +26,6 @@ allowed_external_types = [
    # TODO(https://github.com/awslabs/smithy-rs/issues/1193): Feature gate references to Tokio `File`
    "tokio::fs::file::File",

    # TODO(https://github.com/awslabs/smithy-rs/issues/1193): Don't expose `once_cell` in public API
    "once_cell::sync::Lazy",

    # TODO(https://github.com/awslabs/smithy-rs/issues/1193): Once tooling permits it, only allow the following types in the `event-stream` feature
    "aws_smithy_eventstream::*",
]
+0 −17
Original line number Diff line number Diff line
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

//! HTTP Version-related code

use http::Version as HttpVersion;
use once_cell::sync::Lazy;

/// A list of supported or desired HttpVersions. Typically use when requesting an HTTP Client from a
/// client cache.
pub type HttpVersionList = Vec<HttpVersion>;

/// The default list of desired HTTP protocol versions to use when making requests
pub static DEFAULT_HTTP_VERSION_LIST: Lazy<HttpVersionList> =
    Lazy::new(|| vec![HttpVersion::HTTP_11]);
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ pub mod body;
pub mod endpoint;
pub mod header;
pub mod http;
pub mod http_versions;
pub mod label;
pub mod middleware;
pub mod operation;