Skip to content

Commit

Permalink
Avoid re-exporting ByteStream in server module
Browse files Browse the repository at this point in the history
  • Loading branch information
guymguym committed Feb 3, 2022
1 parent f463cee commit 2ca7cc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class ServerOperationHandlerGenerator(
"PinProjectLite" to ServerCargoDependency.PinProjectLite.asType(),
"Tower" to ServerCargoDependency.Tower.asType(),
"FuturesUtil" to ServerCargoDependency.FuturesUtil.asType(),
"SmithyHttp" to CargoDependency.SmithyHttp(runtimeConfig).asType(),
"SmithyHttpServer" to CargoDependency.SmithyHttpServer(runtimeConfig).asType(),
"SmithyRejection" to ServerHttpProtocolGenerator.smithyRejection(runtimeConfig),
"Phantom" to ServerRuntimeType.Phantom,
Expand Down Expand Up @@ -135,7 +136,7 @@ class ServerOperationHandlerGenerator(
symbolProvider.toSymbol(operation.outputShape(model)).fullName
}
val streamingBodyTraitBounds = if (operation.inputShape(model).hasStreamingMember(model)) {
"\n B: Into<#{SmithyHttpServer}::ByteStream>,"
"\n B: Into<#{SmithyHttp}::byte_stream::ByteStream>,"
} else {
""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ private class ServerHttpProtocolImplGenerator(
"PercentEncoding" to CargoDependency.PercentEncoding.asType(),
"Regex" to CargoDependency.Regex.asType(),
"SerdeUrlEncoded" to ServerCargoDependency.SerdeUrlEncoded.asType(),
"SmithyHttp" to CargoDependency.SmithyHttp(runtimeConfig).asType(),
"SmithyHttpServer" to CargoDependency.SmithyHttpServer(runtimeConfig).asType(),
"SmithyRejection" to ServerHttpProtocolGenerator.smithyRejection(runtimeConfig),
"http" to RuntimeType.http
Expand Down Expand Up @@ -1056,7 +1057,7 @@ private class ServerHttpProtocolImplGenerator(

private fun getStreamingBodyTraitBounds(operationShape: OperationShape): String {
if (operationShape.inputShape(model).hasStreamingMember(model)) {
return "\n B: Into<#{SmithyHttpServer}::ByteStream>,"
return "\n B: Into<#{SmithyHttp}::byte_stream::ByteStream>,"
} else {
return ""
}
Expand Down
3 changes: 0 additions & 3 deletions rust-runtime/aws-smithy-http-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ pub use self::routing::Router;
#[doc(inline)]
pub use tower_http::add_extension::{AddExtension, AddExtensionLayer};

#[doc(inline)]
pub use aws_smithy_http::byte_stream::ByteStream;

/// Alias for a type-erased error type.
pub use axum_core::BoxError;

Expand Down

0 comments on commit 2ca7cc0

Please sign in to comment.