Skip to content

Commit

Permalink
[smithy-rs] Non-functional miscellaneous improvements (#1445)
Browse files Browse the repository at this point in the history
This commit contains non-functional (i.e. mostly stylistic, small
refactors, documentation and consistency) improvements that I've batched
and rolled up while working on #1342.

* Make `extraDependencies` from `InlineDependency` class private
* Miscellaneous improvements to `RustTypes.kt`
* Remove dead code from `RuntimeTypes.kt`
* Style change in `RuntimeTypes.kt`
* Miscellaneous improvements to `SymbolVisitor.kt`
* Miscellaneous improvements to `BuilderGenerator.kt`
    - Make it consistent with the `ServerBuilderGenerator` from #1342.
* Miscellaneous improvements to `TestHelpers.kt`
* Add docs to `headers_for_prefix` function
    - I keep rereading the implementation to see what this returns; it's
      not intuitive from the function name.
  • Loading branch information
david-perez authored and aws-sdk-rust-ci committed Jun 29, 2022
1 parent cbfcb2e commit 01de409
Show file tree
Hide file tree
Showing 1,527 changed files with 189,324 additions and 245,102 deletions.
63 changes: 28 additions & 35 deletions sdk/accessanalyzer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4009,11 +4009,10 @@ impl std::fmt::Display for ValidationException {
}
}
impl std::error::Error for ValidationException {}
/// See [`ValidationException`](crate::error::ValidationException)
/// See [`ValidationException`](crate::error::ValidationException).
pub mod validation_exception {

/// A builder for [`ValidationException`](crate::error::ValidationException)
#[non_exhaustive]
/// A builder for [`ValidationException`](crate::error::ValidationException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand Down Expand Up @@ -4064,7 +4063,7 @@ pub mod validation_exception {
self.field_list = input;
self
}
/// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException)
/// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
Expand All @@ -4075,7 +4074,7 @@ pub mod validation_exception {
}
}
impl ValidationException {
/// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException)
/// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
Expand Down Expand Up @@ -4124,11 +4123,10 @@ impl std::fmt::Display for ThrottlingException {
}
}
impl std::error::Error for ThrottlingException {}
/// See [`ThrottlingException`](crate::error::ThrottlingException)
/// See [`ThrottlingException`](crate::error::ThrottlingException).
pub mod throttling_exception {

/// A builder for [`ThrottlingException`](crate::error::ThrottlingException)
#[non_exhaustive]
/// A builder for [`ThrottlingException`](crate::error::ThrottlingException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand All @@ -4155,7 +4153,7 @@ pub mod throttling_exception {
self.retry_after_seconds = input;
self
}
/// Consumes the builder and constructs a [`ThrottlingException`](crate::error::ThrottlingException)
/// Consumes the builder and constructs a [`ThrottlingException`](crate::error::ThrottlingException).
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
Expand All @@ -4165,7 +4163,7 @@ pub mod throttling_exception {
}
}
impl ThrottlingException {
/// Creates a new builder-style object to manufacture [`ThrottlingException`](crate::error::ThrottlingException)
/// Creates a new builder-style object to manufacture [`ThrottlingException`](crate::error::ThrottlingException).
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
Expand Down Expand Up @@ -4214,11 +4212,10 @@ impl std::fmt::Display for InternalServerException {
}
}
impl std::error::Error for InternalServerException {}
/// See [`InternalServerException`](crate::error::InternalServerException)
/// See [`InternalServerException`](crate::error::InternalServerException).
pub mod internal_server_exception {

/// A builder for [`InternalServerException`](crate::error::InternalServerException)
#[non_exhaustive]
/// A builder for [`InternalServerException`](crate::error::InternalServerException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand All @@ -4245,7 +4242,7 @@ pub mod internal_server_exception {
self.retry_after_seconds = input;
self
}
/// Consumes the builder and constructs a [`InternalServerException`](crate::error::InternalServerException)
/// Consumes the builder and constructs a [`InternalServerException`](crate::error::InternalServerException).
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
Expand All @@ -4255,7 +4252,7 @@ pub mod internal_server_exception {
}
}
impl InternalServerException {
/// Creates a new builder-style object to manufacture [`InternalServerException`](crate::error::InternalServerException)
/// Creates a new builder-style object to manufacture [`InternalServerException`](crate::error::InternalServerException).
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
Expand Down Expand Up @@ -4291,11 +4288,10 @@ impl std::fmt::Display for AccessDeniedException {
}
}
impl std::error::Error for AccessDeniedException {}
/// See [`AccessDeniedException`](crate::error::AccessDeniedException)
/// See [`AccessDeniedException`](crate::error::AccessDeniedException).
pub mod access_denied_exception {

/// A builder for [`AccessDeniedException`](crate::error::AccessDeniedException)
#[non_exhaustive]
/// A builder for [`AccessDeniedException`](crate::error::AccessDeniedException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand All @@ -4311,7 +4307,7 @@ pub mod access_denied_exception {
self.message = input;
self
}
/// Consumes the builder and constructs a [`AccessDeniedException`](crate::error::AccessDeniedException)
/// Consumes the builder and constructs a [`AccessDeniedException`](crate::error::AccessDeniedException).
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
Expand All @@ -4320,7 +4316,7 @@ pub mod access_denied_exception {
}
}
impl AccessDeniedException {
/// Creates a new builder-style object to manufacture [`AccessDeniedException`](crate::error::AccessDeniedException)
/// Creates a new builder-style object to manufacture [`AccessDeniedException`](crate::error::AccessDeniedException).
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
Expand Down Expand Up @@ -4372,11 +4368,10 @@ impl std::fmt::Display for ServiceQuotaExceededException {
}
}
impl std::error::Error for ServiceQuotaExceededException {}
/// See [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException)
/// See [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
pub mod service_quota_exceeded_exception {

/// A builder for [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException)
#[non_exhaustive]
/// A builder for [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand Down Expand Up @@ -4417,7 +4412,7 @@ pub mod service_quota_exceeded_exception {
self.resource_type = input;
self
}
/// Consumes the builder and constructs a [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException)
/// Consumes the builder and constructs a [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
Expand All @@ -4428,7 +4423,7 @@ pub mod service_quota_exceeded_exception {
}
}
impl ServiceQuotaExceededException {
/// Creates a new builder-style object to manufacture [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException)
/// Creates a new builder-style object to manufacture [`ServiceQuotaExceededException`](crate::error::ServiceQuotaExceededException).
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
Expand Down Expand Up @@ -4480,11 +4475,10 @@ impl std::fmt::Display for ConflictException {
}
}
impl std::error::Error for ConflictException {}
/// See [`ConflictException`](crate::error::ConflictException)
/// See [`ConflictException`](crate::error::ConflictException).
pub mod conflict_exception {

/// A builder for [`ConflictException`](crate::error::ConflictException)
#[non_exhaustive]
/// A builder for [`ConflictException`](crate::error::ConflictException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand Down Expand Up @@ -4525,7 +4519,7 @@ pub mod conflict_exception {
self.resource_type = input;
self
}
/// Consumes the builder and constructs a [`ConflictException`](crate::error::ConflictException)
/// Consumes the builder and constructs a [`ConflictException`](crate::error::ConflictException).
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
Expand All @@ -4536,7 +4530,7 @@ pub mod conflict_exception {
}
}
impl ConflictException {
/// Creates a new builder-style object to manufacture [`ConflictException`](crate::error::ConflictException)
/// Creates a new builder-style object to manufacture [`ConflictException`](crate::error::ConflictException).
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
Expand Down Expand Up @@ -4588,11 +4582,10 @@ impl std::fmt::Display for ResourceNotFoundException {
}
}
impl std::error::Error for ResourceNotFoundException {}
/// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException)
/// See [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
pub mod resource_not_found_exception {

/// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException)
#[non_exhaustive]
/// A builder for [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
Expand Down Expand Up @@ -4633,7 +4626,7 @@ pub mod resource_not_found_exception {
self.resource_type = input;
self
}
/// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException)
/// Consumes the builder and constructs a [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
Expand All @@ -4644,7 +4637,7 @@ pub mod resource_not_found_exception {
}
}
impl ResourceNotFoundException {
/// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException)
/// Creates a new builder-style object to manufacture [`ResourceNotFoundException`](crate::error::ResourceNotFoundException).
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
Expand Down
Loading

0 comments on commit 01de409

Please sign in to comment.