From adc2ac08e634e8bc393a00187ea0d8c4eedd456d Mon Sep 17 00:00:00 2001 From: david-perez Date: Thu, 17 Mar 2022 12:19:36 -0700 Subject: [PATCH] Make server operation input and output wrappers `pub(crate)` (#1253) These types are internal details users should not have access to. --- .../server/smithy/protocols/ServerHttpProtocolGenerator.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt index f980f2684..64e9c9646 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpProtocolGenerator.kt @@ -157,7 +157,7 @@ private class ServerHttpProtocolImplGenerator( rustTemplate( """ ##[derive(Debug)] - pub struct $inputName(pub #{I}); + pub(crate) struct $inputName(#{I}); ##[#{AsyncTrait}::async_trait] impl #{AxumCore}::extract::FromRequest for $inputName where @@ -225,7 +225,7 @@ private class ServerHttpProtocolImplGenerator( rustTemplate( """ - pub enum $outputName { + pub(crate) enum $outputName { Output(#{O}), Error(#{E}) } @@ -260,7 +260,7 @@ private class ServerHttpProtocolImplGenerator( rustTemplate( """ - pub struct $outputName(pub #{O}); + pub(crate) struct $outputName(#{O}); ##[#{AsyncTrait}::async_trait] impl #{AxumCore}::response::IntoResponse for $outputName { fn into_response(self) -> #{AxumCore}::response::Response { -- GitLab