update: impl From<DynConnector> for HttpConnector (#1549)

update: CHANGELOG.next.toml
This commit is contained in:
Zelda Hessler 2022-07-18 10:33:48 -05:00 committed by GitHub
parent e6005fb191
commit 70c6a02555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -37,6 +37,12 @@ references = ["smithy-rs#1457"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "calavera"
[[aws-sdk-rust]]
message = "Add `From<aws_smithy_client::erase::DynConnector>` impl for `aws_smithy_client::http_connector::HttpConnector`"
references = ["aws-sdk-rust#581"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "Velfi"
[[smithy-rs]]
message = """
Updated the smithy client's retry behavior to allow for a configurable initial backoff. Previously, the initial backoff

View File

@ -11,7 +11,7 @@
pub mod boxclone;
use boxclone::*;
use crate::{bounds, retry, Client};
use crate::{bounds, http_connector::HttpConnector, retry, Client};
use aws_smithy_http::body::SdkBody;
use aws_smithy_http::result::ConnectorError;
use std::fmt;
@ -178,6 +178,12 @@ impl Service<http::Request<SdkBody>> for DynConnector {
}
}
impl From<DynConnector> for HttpConnector {
fn from(connector: DynConnector) -> Self {
HttpConnector::Prebuilt(Some(connector))
}
}
/// A Smithy middleware that uses dynamic dispatch.
///
/// This type allows you to pay a small runtime cost to avoid having to name the exact middleware