Commit 37e00f55 authored by AWS SDK Rust Bot's avatar AWS SDK Rust Bot
Browse files

[smithy-rs] Rollup of 2 commits



Includes commits:
  f528c523 ServerInstantiator without builder (#3094)
  0f1f1a67 Minimum throughput body timeouts Pt.1 (#3068)

Co-authored-by: default avatar82marbag <69267416+82marbag@users.noreply.github.com>
Co-authored-by: default avatarZelda Hessler <zhessler@amazon.com>
parent c84a2ea7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -184,11 +184,11 @@ mod test {
        // `tokio_test::task::Spawn::poll_next` can only be invoked when the wrapped
        // type implements the `Stream` trait. Here, `FnStream` does not implement it,
        // so we work around it by using the `enter` method.
        let _ = test_stream.enter(|ctx, pin| {
        test_stream.enter(|ctx, pin| {
            let polled = pin.poll_next(ctx);
            assert!(polled.is_pending());
        });
        let _ = test_stream.enter(|ctx, pin| {
        test_stream.enter(|ctx, pin| {
            let polled = pin.poll_next(ctx);
            assert!(polled.is_pending());
        });
+2 −2
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ pub fn default_async_sleep() -> Option<SharedAsyncSleep> {
/// Future returned by [`AsyncSleep`].
#[non_exhaustive]
#[must_use]
pub struct Sleep(Pin<Box<dyn Future<Output = ()> + Send + 'static>>);
pub struct Sleep(Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>);

impl Debug for Sleep {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
@@ -95,7 +95,7 @@ impl Sleep {
    /// Create a new [`Sleep`] future
    ///
    /// The provided future will be Boxed.
    pub fn new(future: impl Future<Output = ()> + Send + 'static) -> Sleep {
    pub fn new(future: impl Future<Output = ()> + Send + Sync + 'static) -> Sleep {
        Sleep(Box::pin(future))
    }
}
+13 −5
Original line number Diff line number Diff line
@@ -15,17 +15,15 @@ rustdoc-args = ["--cfg", "docsrs"]
[features]
client = ["aws-smithy-runtime-api/client"]
http-auth = ["aws-smithy-runtime-api/http-auth"]
connector-hyper-0-14-x = ["dep:hyper", "hyper?/client", "hyper?/http2", "hyper?/http1", "hyper?/tcp"]
connector-hyper-0-14-x = ["dep:hyper-0-14", "hyper-0-14?/client", "hyper-0-14?/http2", "hyper-0-14?/http1", "hyper-0-14?/tcp", "hyper-0-14?/stream"]
tls-rustls = ["dep:hyper-rustls", "dep:rustls", "connector-hyper-0-14-x"]
rt-tokio = ["tokio/rt"]
test-util = ["aws-smithy-runtime-api/test-util", "dep:aws-smithy-protocol-test", "dep:tracing-subscriber", "dep:serde", "dep:serde_json"]
wire-mock = ["test-util", "connector-hyper-0-14-x", "hyper?/server"]
wire-mock = ["test-util", "connector-hyper-0-14-x", "hyper-0-14?/server"]

[dependencies]
bytes = "1"
fastrand = "2.0.0"
http = "0.2.8"
http-body = "0.4.5"
once_cell = "1.18.0"
pin-project-lite = "0.2.7"
pin-utils = "0.1.0"
@@ -53,7 +51,15 @@ path = "../aws-smithy-types"
features = ["http-body-0-4-x"]
version = "0.56.1"

[dependencies.hyper]
[dependencies.http]
version = "0.2.8"

[dependencies.http-body-0-4]
package = "http-body"
version = "0.4.4"

[dependencies.hyper-0-14]
package = "hyper"
version = "0.14.26"
default-features = false
optional = true
@@ -87,6 +93,8 @@ features = ["fmt", "json"]

[dev-dependencies]
approx = "0.5.1"
futures-util = "0.3.28"
pretty_assertions = "1.4.0"
tracing-test = "0.2.1"

[dev-dependencies.aws-smithy-async]
+3 −0
Original line number Diff line number Diff line
@@ -25,4 +25,7 @@ allowed_external_types = [
    "hyper::client::connect::Connection",
    "tokio::io::async_read::AsyncRead",
    "tokio::io::async_write::AsyncWrite",

    # TODO(https://github.com/awslabs/smithy-rs/issues/1193): Once tooling permits it, only allow the following types in the `http-0-x` feature
    "http_body::Body"
]
+3 −0
Original line number Diff line number Diff line
@@ -15,3 +15,6 @@ pub mod test_util;
/// needing to provide equivalent functionality for hyper 1.x in the future.
#[cfg(feature = "connector-hyper-0-14-x")]
pub mod hyper_014;

/// HTTP body and body-wrapper types
pub mod body;
Loading