From be9093c90d5b7657490a6bacd33fee0a90bc2127 Mon Sep 17 00:00:00 2001 From: ysaito1001 Date: Tue, 5 Sep 2023 22:07:26 -0500 Subject: [PATCH] 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 - [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: ysaito1001 --- CHANGELOG.next.toml | 12 ++++++++++++ .../aws-smithy-http/external-types.toml | 3 --- .../aws-smithy-http/src/http_versions.rs | 17 ----------------- rust-runtime/aws-smithy-http/src/lib.rs | 1 - 4 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 rust-runtime/aws-smithy-http/src/http_versions.rs diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 63c22df5e8..468c033fae 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -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" diff --git a/rust-runtime/aws-smithy-http/external-types.toml b/rust-runtime/aws-smithy-http/external-types.toml index a228978c9a..cf745485bb 100644 --- a/rust-runtime/aws-smithy-http/external-types.toml +++ b/rust-runtime/aws-smithy-http/external-types.toml @@ -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::*", ] diff --git a/rust-runtime/aws-smithy-http/src/http_versions.rs b/rust-runtime/aws-smithy-http/src/http_versions.rs deleted file mode 100644 index 4f4373589f..0000000000 --- a/rust-runtime/aws-smithy-http/src/http_versions.rs +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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; - -/// The default list of desired HTTP protocol versions to use when making requests -pub static DEFAULT_HTTP_VERSION_LIST: Lazy = - Lazy::new(|| vec![HttpVersion::HTTP_11]); diff --git a/rust-runtime/aws-smithy-http/src/lib.rs b/rust-runtime/aws-smithy-http/src/lib.rs index ad53e37f9c..b24ecd3bf1 100644 --- a/rust-runtime/aws-smithy-http/src/lib.rs +++ b/rust-runtime/aws-smithy-http/src/lib.rs @@ -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;