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

Move `config_bag` and `type_erasure` to `aws-smithy-types` (#2735)



## Motivation and Context
This PR moves types and traits in those modules to the
`aws-smithy-types` crate.

## Description
This is to prepare for the upcoming refactoring where `SdkConfig` and
service configs (and both of their builders) will be backed by
`ConfigBag`.

## Testing
- [x] Pass 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~~

----

_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 avatarYuki Saito <awsaito@amazon.com>
Co-authored-by: default avatarJohn DiSanti <jdisanti@amazon.com>
parent 8c045d27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
use aws_smithy_runtime_api::client::interceptors::{
    BeforeTransmitInterceptorContextMut, BoxError, Interceptor,
};
use aws_smithy_runtime_api::config_bag::ConfigBag;
use aws_smithy_types::config_bag::ConfigBag;
use http::header::ACCEPT;
use http::HeaderValue;

+3 −3
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ use aws_smithy_runtime_api::client::interceptors::{
    Interceptor,
};
use aws_smithy_runtime_api::client::orchestrator::LoadedRequestBody;
use aws_smithy_runtime_api::config_bag::ConfigBag;
use aws_smithy_types::config_bag::ConfigBag;
use bytes::Bytes;
use http::header::{HeaderName, HeaderValue};
use http::Request;
@@ -234,7 +234,7 @@ fn compute_hash_tree(mut hashes: Vec<Digest>) -> Digest {
mod account_id_autofill_tests {
    use super::*;
    use aws_smithy_runtime_api::client::interceptors::InterceptorContext;
    use aws_smithy_runtime_api::type_erasure::TypedBox;
    use aws_smithy_types::type_erasure::TypedBox;

    #[test]
    fn autofill_account_id() {
@@ -273,7 +273,7 @@ mod account_id_autofill_tests {
mod api_version_tests {
    use super::*;
    use aws_smithy_runtime_api::client::interceptors::InterceptorContext;
    use aws_smithy_runtime_api::type_erasure::TypedBox;
    use aws_smithy_types::type_erasure::TypedBox;

    #[test]
    fn api_version_interceptor() {
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ use aws_smithy_runtime_api::client::auth::{
};
use aws_smithy_runtime_api::client::identity::{Identity, IdentityResolver, IdentityResolvers};
use aws_smithy_runtime_api::client::orchestrator::{BoxError, ConfigBagAccessors, HttpRequest};
use aws_smithy_runtime_api::config_bag::ConfigBag;
use aws_smithy_types::config_bag::ConfigBag;
use aws_smithy_types::Document;
use aws_types::region::{Region, SigningRegion};
use aws_types::SigningService;
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ pub mod credentials {
    use aws_credential_types::cache::SharedCredentialsCache;
    use aws_smithy_runtime_api::client::identity::{Identity, IdentityResolver};
    use aws_smithy_runtime_api::client::orchestrator::{BoxError, Future};
    use aws_smithy_runtime_api::config_bag::ConfigBag;
    use aws_smithy_types::config_bag::ConfigBag;

    /// Smithy identity resolver for AWS credentials.
    #[derive(Debug)]
+3 −3
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ use aws_smithy_runtime_api::client::interceptors::error::BoxError;
use aws_smithy_runtime_api::client::interceptors::{
    BeforeTransmitInterceptorContextMut, Interceptor,
};
use aws_smithy_runtime_api::config_bag::ConfigBag;
use aws_smithy_types::config_bag::ConfigBag;
use http::{HeaderName, HeaderValue};
use uuid::Uuid;

@@ -75,8 +75,8 @@ mod tests {
    use crate::invocation_id::InvocationIdInterceptor;
    use aws_smithy_http::body::SdkBody;
    use aws_smithy_runtime_api::client::interceptors::{Interceptor, InterceptorContext};
    use aws_smithy_runtime_api::config_bag::ConfigBag;
    use aws_smithy_runtime_api::type_erasure::TypedBox;
    use aws_smithy_types::config_bag::ConfigBag;
    use aws_smithy_types::type_erasure::TypedBox;
    use http::HeaderValue;

    fn expect_header<'a>(context: &'a InterceptorContext, header_name: &str) -> &'a HeaderValue {
Loading